From ce8218fef2c494d8fa94257f1cd96d857b32a279 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 15 May 2017 08:51:40 -0400 Subject: [PATCH] removing unused parameter --- .../trigger/trigger_emulator_algo.cpp | 16 +++++++--------- .../controllers/trigger/trigger_emulator_algo.h | 2 +- firmware/development/trigger_emulator.cpp | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index 1565c56e40..da352ada8f 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -23,9 +23,7 @@ #include "trigger_central.h" #include "trigger_simulator.h" -#if EFI_PROD_CODE #include "pwm_generator.h" -#endif TriggerEmulatorHelper::TriggerEmulatorHelper() { primaryWheelState = false; @@ -157,16 +155,16 @@ static void emulatorApplyPinState(PwmConfig *state, int stateIndex) { } } -static void setEmulatorAtIndex(int index, Engine *engine) { +static void setEmulatorAtIndex(int index) { stopEmulationAtIndex = index; } -static void resumeStimulator(Engine *engine) { +static void resumeStimulator() { isEmulating = true; stopEmulationAtIndex = DO_NOT_STOP; } -void initTriggerEmulatorLogic(Logging *sharedLogger, Engine *engine) { +void initTriggerEmulatorLogic(Logging *sharedLogger) { logger = sharedLogger; TriggerShape *s = &engine->triggerCentral.triggerShape; @@ -176,8 +174,8 @@ void initTriggerEmulatorLogic(Logging *sharedLogger, Engine *engine) { triggerSignal.weComplexInit("position sensor", s->getSize(), s->wave.switchTimes, PWM_PHASE_MAX_WAVE_PER_PWM, pinStates, updateTriggerShapeIfNeeded, emulatorApplyPinState); - addConsoleActionIP("rpm", (VoidIntVoidPtr) setTriggerEmulatorRPM, engine); - addConsoleActionIP("stop_stimulator_at_index", (VoidIntVoidPtr) setEmulatorAtIndex, engine); - addConsoleActionP("resume_stimulator", (VoidPtr) resumeStimulator, engine); + addConsoleActionI("rpm", setTriggerEmulatorRPM); + addConsoleActionI("stop_stimulator_at_index", setEmulatorAtIndex); + addConsoleAction("resume_stimulator", resumeStimulator); } -#endif +#endif /* EFI_EMULATE_POSITION_SENSORS */ diff --git a/firmware/controllers/trigger/trigger_emulator_algo.h b/firmware/controllers/trigger/trigger_emulator_algo.h index 9db010748e..305a61c685 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.h +++ b/firmware/controllers/trigger/trigger_emulator_algo.h @@ -21,6 +21,6 @@ public: void handleEmulatorCallback(PwmConfig *state, int stateIndex); }; -void initTriggerEmulatorLogic(Logging *sharedLogger, Engine *engine); +void initTriggerEmulatorLogic(Logging *sharedLogger); #endif /* TRIGGER_EMULATOR_ALGO_H_ */ diff --git a/firmware/development/trigger_emulator.cpp b/firmware/development/trigger_emulator.cpp index 947f3c8862..9e0e75b409 100644 --- a/firmware/development/trigger_emulator.cpp +++ b/firmware/development/trigger_emulator.cpp @@ -51,7 +51,7 @@ void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) { &boardConfiguration->triggerSimulatorPinModes[2]); #endif /* EFI_PROD_CODE */ - initTriggerEmulatorLogic(sharedLogger, engine); + initTriggerEmulatorLogic(sharedLogger); #else print("No position sensor(s) emulation\r\n"); #endif /* EFI_EMULATE_POSITION_SENSORS */