diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index f503dcf99b..36d11ed84d 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -163,6 +163,7 @@ int getTimeNowSeconds(void) { } static void onEvenyGeneralMilliseconds(void *arg) { + (void)arg; /** * We need to push current value into the 64 bit counter often enough so that we do not miss an overflow */ @@ -191,6 +192,7 @@ static void initPeriodicEvents(void) { } static void fuelPumpOff(void *arg) { + (void)arg; if (getOutputPinValue(FUEL_PUMP_RELAY)) scheduleMsg(&logger, "fuelPump OFF at %s%d", hwPortname(boardConfiguration->fuelPumpPin)); turnOutputPinOff(FUEL_PUMP_RELAY); diff --git a/firmware/controllers/idle_thread.cpp b/firmware/controllers/idle_thread.cpp index 324d761565..5803353a83 100644 --- a/firmware/controllers/idle_thread.cpp +++ b/firmware/controllers/idle_thread.cpp @@ -80,6 +80,7 @@ static void setIdleValvePwm(int value) { } static msg_t ivThread(int param) { + (void)param; chRegSetThreadName("IdleValve"); int currentIdleValve = -1; diff --git a/firmware/controllers/system/SingleTimerExecutor.cpp b/firmware/controllers/system/SingleTimerExecutor.cpp index b125bec626..685d47f839 100644 --- a/firmware/controllers/system/SingleTimerExecutor.cpp +++ b/firmware/controllers/system/SingleTimerExecutor.cpp @@ -28,6 +28,7 @@ static Executor instance; extern schfunc_t globalTimerCallback; static void executorCallback(void *arg) { + (void)arg; instance.onTimerCallback(); } diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index 5fc193635d..e7320bec83 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -152,6 +152,7 @@ static void onTdcCallback(void) { * This trigger callback schedules the actual physical TDC callback in relation to trigger synchronization point. */ static void tdcMarkCallback(trigger_event_e ckpSignalType, uint32_t index0, void *arg) { + (void)ckpSignalType; bool isTriggerSynchronizationPoint = index0 == 0; if (isTriggerSynchronizationPoint) { int revIndex2 = getRevolutionCounter() % 2; diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 44dd94648e..49099028fa 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -222,6 +222,7 @@ float getTriggerDutyCycle(int index) { } void initTriggerCentral(Engine *engine) { + // todo: use 'engine' parameter and eliminate 'extern' strcpy((char*) shaft_signal_msg_index, "_"); #if EFI_WAVE_CHART diff --git a/firmware/controllers/trigger/trigger_decoder.h b/firmware/controllers/trigger/trigger_decoder.h index 5c7a0ccae5..1cbfdb0043 100644 --- a/firmware/controllers/trigger/trigger_decoder.h +++ b/firmware/controllers/trigger/trigger_decoder.h @@ -45,7 +45,7 @@ public: /** * Total time result for previous trigger cycle */ - int prevTotalTime[PWM_PHASE_MAX_WAVE_PER_PWM]; + uint32_t prevTotalTime[PWM_PHASE_MAX_WAVE_PER_PWM]; int expectedTotalTime[PWM_PHASE_MAX_WAVE_PER_PWM]; private: @@ -53,15 +53,15 @@ private: /** * index within trigger revolution, from 0 to trigger event count */ - int current_index; + uint32_t current_index; /** * Number of actual events within current trigger cycle * see trigger_shape_s */ - int eventCount[PWM_PHASE_MAX_WAVE_PER_PWM]; + uint32_t eventCount[PWM_PHASE_MAX_WAVE_PER_PWM]; uint64_t timeOfPreviousEvent[PWM_PHASE_MAX_WAVE_PER_PWM]; uint64_t totalEventCountBase; - int totalRevolutionCounter; + uint32_t totalRevolutionCounter; bool isFirstEvent; uint64_t prevCycleDuration; uint64_t startOfCycle; diff --git a/firmware/hw_layer/io_pins.c b/firmware/hw_layer/io_pins.c index a0a1430049..e09bda4b60 100644 --- a/firmware/hw_layer/io_pins.c +++ b/firmware/hw_layer/io_pins.c @@ -78,6 +78,7 @@ void setDefaultPinState(io_pin_e pin, pin_output_mode_e *outputMode) { } static void comBlinkingThread(void *arg) { + (void)arg; chRegSetThreadName("communication blinking"); while (TRUE) { int delay; @@ -105,6 +106,7 @@ static void comBlinkingThread(void *arg) { int isTriggerDecoderError(void); static void errBlinkingThread(void *arg) { + (void)arg; chRegSetThreadName("err blinking"); #if EFI_ENGINE_CONTROL while (TRUE) { diff --git a/firmware/hw_layer/microsecond_timer.c b/firmware/hw_layer/microsecond_timer.c index 7429321447..460277d47b 100644 --- a/firmware/hw_layer/microsecond_timer.c +++ b/firmware/hw_layer/microsecond_timer.c @@ -52,6 +52,7 @@ void setHardwareUsTimer(int32_t timeUs) { } static void callback(GPTDriver *gptp) { + (void)gptp; timerCallbackCounter++; if (globalTimerCallback == NULL) { firmwareError("NULL globalTimerCallback"); @@ -78,6 +79,7 @@ static const char * msg; static char buff[32]; static msg_t mwThread(int param) { + (void)param; chRegSetThreadName("timer watchdog"); while (TRUE) {