diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index 2467a19a6a..f3e0f559a6 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -36,15 +36,6 @@ extern WaveChart waveChart; #define TOP_DEAD_CENTER_MESSAGE "r" -/** - * WARNING: this is a heavy method because 'getRpm()' is relatively heavy - * - * @return -1 in case of isNoisySignal(), current RPM otherwise - */ -int getRpmE(Engine *engine) { - return engine->rpmCalculator.rpm(); -} - EXTERN_ENGINE; #if EFI_PROD_CODE || EFI_SIMULATOR @@ -96,6 +87,11 @@ uint32_t RpmCalculator::getRevolutionCounterSinceStart(void) { return revolutionCounterSinceStart; } +/** + * WARNING: this is a heavy method because 'getRpm()' is relatively heavy + * + * @return -1 in case of isNoisySignal(), current RPM otherwise + */ // todo: migrate to float return result or add a float verion? this would have with calculations // todo: add a version which does not check time & saves time? need to profile int RpmCalculator::rpm(void) { diff --git a/firmware/controllers/trigger/rpm_calculator.h b/firmware/controllers/trigger/rpm_calculator.h index 3ad545b857..24bc8dd8de 100644 --- a/firmware/controllers/trigger/rpm_calculator.h +++ b/firmware/controllers/trigger/rpm_calculator.h @@ -59,7 +59,8 @@ private: /** * @brief Current RPM */ -int getRpmE(Engine *engine); +#define getRpmE(engine) (engine)->rpmCalculator.rpm() + bool isCrankingE(Engine *engine); void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index, Engine *engine); /** diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index a679eaf927..a1652e9655 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -270,5 +270,5 @@ int getRusEfiVersion(void) { return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE == 0) return 1; // this is here to make the compiler happy about the unused array - return 20141123; + return 20141124; }