code formatting

This commit is contained in:
rusefi 2017-07-06 21:21:45 -04:00
parent e58b53dcb2
commit 594dfb639d
3 changed files with 7 additions and 6 deletions

View File

@ -262,7 +262,7 @@ static void periodicSlowCallback(Engine *engine) {
/**
* Update engine RPM state if needed (check timeouts).
*/
engine->rpmCalculator.checkIfSpinning(PASS_ENGINE_PARAMETER_SIGNATURE);
engine->rpmCalculator.checkIfSpinning(PASS_ENGINE_PARAMETER_SIGNATURE);
if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
#if (EFI_PROD_CODE && EFI_ENGINE_CONTROL && EFI_INTERNAL_FLASH) || defined(__DOXYGEN__)

View File

@ -47,7 +47,7 @@ int revolutionCounterSinceBootForUnitTest = 0;
RpmCalculator::RpmCalculator() {
#if !EFI_PROD_CODE
mockRpm = MOCK_UNDEFINED;
#endif
#endif /* EFI_PROD_CODE */
rpmValue = 0;
assignRpmValue(0);
@ -166,9 +166,10 @@ void RpmCalculator::setStopped(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// todo: add a version which does not check time & saves time? need to profile
int RpmCalculator::getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#if !EFI_PROD_CODE
if (mockRpm != MOCK_UNDEFINED)
return mockRpm;
#endif
if (mockRpm != MOCK_UNDEFINED) {
return mockRpm;
}
#endif /* EFI_PROD_CODE */
if (!isRunning(PASS_ENGINE_PARAMETER_SIGNATURE)) {
setStopped(PASS_ENGINE_PARAMETER_SIGNATURE);
}

View File

@ -52,7 +52,7 @@ class RpmCalculator {
public:
#if !EFI_PROD_CODE
int mockRpm;
#endif
#endif /* EFI_PROD_CODE */
RpmCalculator();
/**
* Returns true if the engine is not spinning (RPM==0)