From 520a4fccee86dd2ee26624a393216237e4aa7744 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Wed, 24 Sep 2014 14:03:03 -0500 Subject: [PATCH] auto-sync --- firmware/console/status_loop.cpp | 1 + firmware/controllers/algo/fuel_math.cpp | 1 + firmware/controllers/engine_controller.cpp | 1 + firmware/controllers/injector_central.cpp | 1 + firmware/controllers/map_averaging.cpp | 4 +++- firmware/controllers/trigger/main_trigger_callback.cpp | 1 + firmware/controllers/trigger/rpm_calculator.cpp | 1 + firmware/controllers/trigger/trigger_decoder.cpp | 1 + firmware/controllers/trigger/trigger_structure.h | 2 +- firmware/emulation/engine_emulator.cpp | 1 + firmware/emulation/wave_analyzer.cpp | 3 +++ firmware/hw_layer/board_test.cpp | 1 + firmware/hw_layer/rtc_helper.c | 2 ++ 13 files changed, 18 insertions(+), 2 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 101e301a5a..4d2af41a0b 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -400,6 +400,7 @@ extern TunerStudioOutputChannels tsOutputChannels; #endif /* EFI_TUNER_STUDIO */ static void tsStatusThread(void *arg) { + (void)arg; chRegSetThreadName("tuner s"); while (true) { #if EFI_TUNER_STUDIO diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 643717bc92..d11f65291c 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -81,6 +81,7 @@ float getFuelMs(int rpm, Engine *engine) { } } +// todo: start using 'engine' parameter and not 'extern' float getRunningFuel(float baseFuel, Engine *engine, int rpm) { float iatCorrection = getIatCorrection(getIntakeAirTemperature()); float cltCorrection = getCltCorrection(getCoolantTemperature()); diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 36d11ed84d..82c0d41b59 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -199,6 +199,7 @@ static void fuelPumpOff(void *arg) { } static void fuelPumpOn(trigger_event_e signal, uint32_t index, void *arg) { + (void)arg; if (index != 0) return; // let's not abuse the timer - one time per revolution would be enough // todo: the check about GPIO_NONE should be somewhere else! diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp index 8afafe746b..1f492072dc 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/injector_central.cpp @@ -155,6 +155,7 @@ static void sparkbench(const char * onTimeStr, const char *offTimeStr, const cha static THD_WORKING_AREA(benchThreadStack, UTILITY_THREAD_STACK_SIZE); static msg_t benchThread(int param) { + (void)param; chRegSetThreadName("BenchThread"); while (TRUE) { diff --git a/firmware/controllers/map_averaging.cpp b/firmware/controllers/map_averaging.cpp index ee11ed5dcd..2c3af4b3b6 100644 --- a/firmware/controllers/map_averaging.cpp +++ b/firmware/controllers/map_averaging.cpp @@ -71,7 +71,8 @@ extern engine_configuration_s *engineConfiguration; static scheduling_s startTimer[2]; static scheduling_s endTimer[2]; -static void startAveraging(void*arg) { +static void startAveraging(void *arg) { + (void) arg; bool wasLocked = lockAnyContext(); ; // with locking we would have a consistent state @@ -111,6 +112,7 @@ void mapAveragingCallback(adcsample_t value) { } static void endAveraging(void *arg) { + (void) arg; bool wasLocked = lockAnyContext(); // with locking we would have a consistent state v_averagedMapValue = v_mapAccumulator / mapMeasurementsCounter; diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index 89fb4ba261..2bdb84ebde 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -231,6 +231,7 @@ extern Engine engine; * Both injection and ignition are controlled from this method. */ void onTriggerEvent(trigger_event_e ckpSignalType, uint32_t eventIndex, MainTriggerCallback *mainTriggerCallback) { + (void)ckpSignalType; efiAssertVoid(eventIndex < 2 * mainTriggerCallback->engineConfiguration2->triggerShape.shaftPositionEventCount, "event index"); efiAssertVoid(getRemainingStack(chThdSelf()) > 16, "stack#3"); diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index e7320bec83..87de1ec803 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)arg; (void)ckpSignalType; bool isTriggerSynchronizationPoint = index0 == 0; if (isTriggerSynchronizationPoint) { diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index e1355e46b6..284a454703 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -80,6 +80,7 @@ static trigger_value_e eventType[6] = { TV_LOW, TV_HIGH, TV_LOW, TV_HIGH, TV_LOW */ void TriggerState::decodeTriggerEvent(trigger_shape_s const*triggerShape, trigger_config_s const*triggerConfig, trigger_event_e const signal, uint64_t nowUs) { + (void)triggerConfig; // we might want this for logging? efiAssertVoid(signal <= SHAFT_3RD_UP, "unexpected signal"); trigger_wheel_e triggerWheel = eventIndex[signal]; diff --git a/firmware/controllers/trigger/trigger_structure.h b/firmware/controllers/trigger/trigger_structure.h index e69c3d2bbc..a0b958f6c4 100644 --- a/firmware/controllers/trigger/trigger_structure.h +++ b/firmware/controllers/trigger/trigger_structure.h @@ -44,7 +44,7 @@ public: /** * This is used for signal validation */ - int expectedEventCount[PWM_PHASE_MAX_WAVE_PER_PWM]; + uint32_t expectedEventCount[PWM_PHASE_MAX_WAVE_PER_PWM]; void addEvent(float angle, trigger_wheel_e const waveIndex, trigger_value_e const state); void reset(operation_mode_e operationMode); diff --git a/firmware/emulation/engine_emulator.cpp b/firmware/emulation/engine_emulator.cpp index 97f34d9ebc..2e2e01a32d 100644 --- a/firmware/emulation/engine_emulator.cpp +++ b/firmware/emulation/engine_emulator.cpp @@ -58,6 +58,7 @@ void emulate(void) { static int flag = FALSE; static msg_t eeThread(void *arg) { + (void)arg; chRegSetThreadName("Engine"); while (TRUE) { diff --git a/firmware/emulation/wave_analyzer.cpp b/firmware/emulation/wave_analyzer.cpp index 24b2dae0dd..2428adfd3f 100644 --- a/firmware/emulation/wave_analyzer.cpp +++ b/firmware/emulation/wave_analyzer.cpp @@ -138,6 +138,8 @@ static void initWave(const char *name, int index) { #endif static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index, void *arg) { + (void)ckpSignalType; + (void)arg; if (index != 0) { return; } @@ -151,6 +153,7 @@ static THD_WORKING_AREA(waThreadStack, UTILITY_THREAD_STACK_SIZE); //static Logging logger; static msg_t waThread(void *arg) { + (void)arg; chRegSetThreadName("Wave Analyzer"); #if EFI_WAVE_CHART while (TRUE) { diff --git a/firmware/hw_layer/board_test.cpp b/firmware/hw_layer/board_test.cpp index a8788da786..80431a2b87 100644 --- a/firmware/hw_layer/board_test.cpp +++ b/firmware/hw_layer/board_test.cpp @@ -106,6 +106,7 @@ static brain_pin_e BLINK_PINS[] = { GPIOE_8, // HIGH DRIVER 1 static THD_WORKING_AREA(btThreadStack, UTILITY_THREAD_STACK_SIZE); static msg_t ivThread(int param) { + (void)param; chRegSetThreadName("board test blinking"); int value = 0; diff --git a/firmware/hw_layer/rtc_helper.c b/firmware/hw_layer/rtc_helper.c index 72402101a6..68efa39b23 100644 --- a/firmware/hw_layer/rtc_helper.c +++ b/firmware/hw_layer/rtc_helper.c @@ -26,12 +26,14 @@ static void date_help(void) { #endif /* EFI_RTC */ void date_set_tm(struct tm *timp) { + (void)timp; #if EFI_RTC rtcSetTimeTm(&RTCD1, timp); #endif /* EFI_RTC */ } void date_get_tm(struct tm *timp) { + (void)timp; #if EFI_RTC rtcGetTimeTm(&RTCD1, timp); #endif /* EFI_RTC */