From e33424b2e7e280986d6bc642e226419cfde06c01 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 8 Nov 2014 11:03:07 -0600 Subject: [PATCH] auto-sync --- firmware/controllers/engine_controller.cpp | 2 +- firmware/controllers/trigger/rpm_calculator.cpp | 2 +- firmware/controllers/trigger/rpm_calculator.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 47b49666cc..13d5259936 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -366,7 +366,7 @@ void initEngineContoller(Engine *engine) { * there is an implicit dependency on the fact that 'tachometer' listener is the 1st listener - this case * other listeners can access current RPM value */ - initRpmCalculator(); + initRpmCalculator(engine); #endif /* EFI_SHAFT_POSITION_INPUT */ #if EFI_TUNER_STUDIO diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index 5312ad3039..8f973631c6 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -222,7 +222,7 @@ float getCrankshaftAngleNt(uint64_t timeNt) { return timeSinceZeroAngleNt / getOneDegreeTimeNt(rpmState.rpm()); } -void initRpmCalculator(void) { +void initRpmCalculator(Engine *engine) { #if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__) initLogging(&logger, "rpm calc"); engine->rpmCalculator = &rpmState; diff --git a/firmware/controllers/trigger/rpm_calculator.h b/firmware/controllers/trigger/rpm_calculator.h index 2397dfc838..be460172eb 100644 --- a/firmware/controllers/trigger/rpm_calculator.h +++ b/firmware/controllers/trigger/rpm_calculator.h @@ -55,16 +55,16 @@ private: int getRpmE(Engine *engine); bool isCrankingE(Engine *engine); void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index, RpmCalculator *rpmState); +/** + * @brief Initialize RPM calculator + */ +void initRpmCalculator(Engine *engine); #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/** - * @brief Initialize RPM calculator - */ -void initRpmCalculator(void); bool isCranking(void); uint64_t getLastRpmEventTime(void);