From 4d6351591c1504f5aeca8f3daee732f9c7776f0e Mon Sep 17 00:00:00 2001 From: rusEfi Date: Wed, 15 Jul 2015 21:01:45 -0400 Subject: [PATCH] auto-sync --- firmware/config/stm32f4ems/efifeatures.h | 2 +- firmware/controllers/algo/signal_executor.cpp | 8 ++++---- firmware/controllers/settings.cpp | 10 +++++----- firmware/controllers/trigger/main_trigger_callback.cpp | 6 +++--- firmware/controllers/trigger/rpm_calculator.cpp | 6 +++--- firmware/controllers/trigger/rpm_calculator.h | 4 ++-- firmware/controllers/trigger/trigger_central.cpp | 10 +++++----- firmware/controllers/trigger/trigger_emulator_algo.cpp | 10 +++++----- firmware/development/development.mk | 4 ++-- .../development/{wave_chart.cpp => engine_sniffer.cpp} | 8 ++++---- .../development/{wave_chart.h => engine_sniffer.h} | 6 +++--- firmware/development/rfi_perftest.cpp | 2 +- firmware/development/wave_analyzer.cpp | 8 ++++---- firmware/development/wave_analyzer.h | 2 +- win32_functional_tests/simulator/efifeatures.h | 2 +- .../simulator/rusEfiFunctionalTest.cpp | 2 +- 16 files changed, 45 insertions(+), 45 deletions(-) rename firmware/development/{wave_chart.cpp => engine_sniffer.cpp} (98%) rename firmware/development/{wave_chart.h => engine_sniffer.h} (87%) diff --git a/firmware/config/stm32f4ems/efifeatures.h b/firmware/config/stm32f4ems/efifeatures.h index 7b242401ef..0222e988c8 100644 --- a/firmware/config/stm32f4ems/efifeatures.h +++ b/firmware/config/stm32f4ems/efifeatures.h @@ -140,7 +140,7 @@ #define EFI_SUPPORT_NISSAN_PRIMERA TRUE #define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE -#define EFI_WAVE_CHART TRUE +#define EFI_ENGINE_SNIFFER TRUE #define EFI_HISTOGRAMS FALSE #define EFI_ANALOG_CHART TRUE diff --git a/firmware/controllers/algo/signal_executor.cpp b/firmware/controllers/algo/signal_executor.cpp index 7d97d00cef..d6d5983031 100644 --- a/firmware/controllers/algo/signal_executor.cpp +++ b/firmware/controllers/algo/signal_executor.cpp @@ -34,8 +34,8 @@ EXTERN_ENGINE; -#if EFI_WAVE_CHART -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER +#include "engine_sniffer.h" extern WaveChart waveChart; #endif @@ -74,7 +74,7 @@ void turnPinHigh(NamedOutputPin *output) { doSetOutputPinValue2(output, true); // sleep for the needed duration #endif -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER // explicit check here is a performance optimization to speed up no-chart mode if (CONFIG(isEngineChartEnabled)) { // this is a performance optimization - array index is cheaper then invoking a method with 'switch' @@ -100,7 +100,7 @@ void turnPinLow(NamedOutputPin *output) { scheduleLogging(&signal->logging); #endif /* EFI_DEFAILED_LOGGING */ -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER if (CONFIG(isEngineChartEnabled)) { // this is a performance optimization - array index is cheaper then invoking a method with 'switch' const char *pinName = output->name; diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 01550af504..4f19d400b7 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -35,11 +35,11 @@ #include "flash_main.h" #endif /* EFI_INTERNAL_FLASH */ -#if EFI_WAVE_CHART || defined(__DOXYGEN__) -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) +#include "engine_sniffer.h" extern int waveChartUsedSize; extern WaveChart waveChart; -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ static char LOGGING_BUFFER[1000]; static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER)); @@ -303,7 +303,7 @@ static void setTimingMode(int value) { void setEngineType(int value) { engineConfiguration->engineType = (engine_type_e) value; resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER); -#if EFI_WAVE_CHART || defined(__DOXYGEN__) +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) if (engine->isTestMode) waveChart.resetWaveChart(); #endif @@ -910,7 +910,7 @@ void stopEngine(void) { static void printAllInfo(void) { printTemperatureInfo(); printTPSInfo(); -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER scheduleMsg(&logger, "waveChartUsedSize=%d", waveChartUsedSize); #endif #if EFI_PROD_CODE diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index 2ca78efa6c..3ebcd7d46c 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -425,14 +425,14 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL } } -#if EFI_WAVE_CHART || defined(__DOXYGEN__) -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) +#include "engine_sniffer.h" #endif static void showTriggerHistogram(void) { printAllCallbacksHistogram(); showMainHistogram(); -#if EFI_WAVE_CHART || defined(__DOXYGEN__) +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) showWaveChartHistogram(); #endif } diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index daa8f01ec5..40083fa8b5 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -30,10 +30,10 @@ #include "efilib2.h" -#if EFI_WAVE_CHART -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER +#include "engine_sniffer.h" extern WaveChart waveChart; -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ EXTERN_ENGINE ; diff --git a/firmware/controllers/trigger/rpm_calculator.h b/firmware/controllers/trigger/rpm_calculator.h index 2a5b2f42f8..19ba411713 100644 --- a/firmware/controllers/trigger/rpm_calculator.h +++ b/firmware/controllers/trigger/rpm_calculator.h @@ -97,11 +97,11 @@ bool isCranking(void); #define isValidRpm(rpm) ((rpm) > 0 && (rpm) < UNREALISTIC_RPM) -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER #define addWaveChartEvent(name, msg) waveChart.addWaveChartEvent3((name), (msg)) #else #define addWaveChartEvent(n, msg) {} -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param, RpmCalculator *calc); diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 495a437a14..5f94d327d7 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -27,10 +27,10 @@ #include "pin_repository.h" #endif -#if EFI_WAVE_CHART -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER +#include "engine_sniffer.h" WaveChart waveChart; -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ static histogram_s triggerCallback; @@ -392,9 +392,9 @@ void initTriggerCentral(Logging *sharedLogger, Engine *engine) { logger = sharedLogger; strcpy((char*) shaft_signal_msg_index, "x_"); -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER initWaveChart(&waveChart); -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ #if EFI_PROD_CODE || EFI_SIMULATOR addConsoleAction("triggerinfo", triggerInfo); diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index cb7449b1ce..aa0d4e9cc3 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -87,10 +87,10 @@ static bool isEmulating = true; static Logging *logger; static LocalVersionHolder emulatorConfigVersion; -#if EFI_WAVE_CHART -#include "wave_chart.h" +#if EFI_ENGINE_SNIFFER +#include "engine_sniffer.h" extern WaveChart waveChart; -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ void setTriggerEmulatorRPM(int rpm, Engine *engine) { engineConfiguration->bc.triggerSimulatorFrequency = rpm; @@ -105,10 +105,10 @@ void setTriggerEmulatorRPM(int rpm, Engine *engine) { float gRpm = rpm * rpmM / 60.0; // per minute converted to per second triggerSignal.periodNt = US2NT(frequency2periodUs(gRpm)); } -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER if (engine->isTestMode) waveChart.resetWaveChart(); -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ scheduleMsg(logger, "Emulating position sensor(s). RPM=%d", rpm); } diff --git a/firmware/development/development.mk b/firmware/development/development.mk index b103e17c71..4217acd2f2 100644 --- a/firmware/development/development.mk +++ b/firmware/development/development.mk @@ -7,7 +7,7 @@ DEV_SRC_CPP = development/trigger_emulator.cpp \ development/sensor_chart.cpp \ development/rfi_perftest.cpp \ development/engine_emulator.cpp \ - $(PROJECT_DIR)/development/wave_chart.cpp \ + $(PROJECT_DIR)/development/engine_sniffer.cpp \ development/wave_analyzer.cpp -DEV_SIMULATOR_SRC_CPP = $(PROJECT_DIR)/development/wave_chart.cpp \ No newline at end of file +DEV_SIMULATOR_SRC_CPP = $(PROJECT_DIR)/development/engine_sniffer.cpp \ No newline at end of file diff --git a/firmware/development/wave_chart.cpp b/firmware/development/engine_sniffer.cpp similarity index 98% rename from firmware/development/wave_chart.cpp rename to firmware/development/engine_sniffer.cpp index 26fb03b4cb..c3fa9ae4ae 100644 --- a/firmware/development/wave_chart.cpp +++ b/firmware/development/engine_sniffer.cpp @@ -1,5 +1,5 @@ /** - * @file wave_chart.cpp + * @file engine_sniffer.cpp * @brief Dev console wave sniffer logic * * Here we have our own build-in logic analyzer. The data we aggregate here is sent to the @@ -25,9 +25,9 @@ */ #include "main.h" -#include "wave_chart.h" +#include "engine_sniffer.h" -#if EFI_WAVE_CHART || defined(__DOXYGEN__) +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) #include "engine_configuration.h" #include "eficonsole.h" @@ -268,4 +268,4 @@ void initWaveChart(WaveChart *chart) { #endif } -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ diff --git a/firmware/development/wave_chart.h b/firmware/development/engine_sniffer.h similarity index 87% rename from firmware/development/wave_chart.h rename to firmware/development/engine_sniffer.h index e52add2569..601f606f74 100644 --- a/firmware/development/wave_chart.h +++ b/firmware/development/engine_sniffer.h @@ -1,5 +1,5 @@ /** - * @file wave_chart.h + * @file engine_sniffer.h * @brief Dev console wave sniffer * * @date Jun 23, 2013 @@ -11,7 +11,7 @@ #include "global.h" -#if EFI_WAVE_CHART || defined(__DOXYGEN__) +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) #include "datalogging.h" /** @@ -38,6 +38,6 @@ void initWaveChart(WaveChart *chart); void showWaveChartHistogram(void); void setChartSize(int newSize); -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ #endif /* WAVE_CHART_H_ */ diff --git a/firmware/development/rfi_perftest.cpp b/firmware/development/rfi_perftest.cpp index 91a88f6a24..7e9b7e0d4d 100644 --- a/firmware/development/rfi_perftest.cpp +++ b/firmware/development/rfi_perftest.cpp @@ -285,7 +285,7 @@ static void runChibioTest(void) { print("EFI_HD44780_LCD=%d\r\n", EFI_HD44780_LCD); print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING); print("EFI_WAVE_ANALYZER=%d\r\n", EFI_WAVE_ANALYZER); - print("EFI_WAVE_CHART=%d\r\n", EFI_WAVE_CHART); + print("EFI_ENGINE_SNIFFER=%d\r\n", EFI_ENGINE_SNIFFER); print("EFI_ANALOG_CHART=%d\r\n", EFI_ANALOG_CHART); print("EFI_SHAFT_POSITION_INPUT=%d\r\n", EFI_SHAFT_POSITION_INPUT); print("EFI_ENGINE_CONTROL=%d\r\n", EFI_ENGINE_CONTROL); diff --git a/firmware/development/wave_analyzer.cpp b/firmware/development/wave_analyzer.cpp index 4c09731143..0d148fb6fc 100644 --- a/firmware/development/wave_analyzer.cpp +++ b/firmware/development/wave_analyzer.cpp @@ -23,7 +23,7 @@ #include "engine_math.h" #include "engine.h" #include "rpm_calculator.h" -#include "wave_chart.h" +#include "engine_sniffer.h" #if EFI_WAVE_ANALYZER || defined(__DOXYGEN__) @@ -32,7 +32,7 @@ EXTERN_ENGINE; #define CHART_RESET_DELAY 1 #define MAX_ICU_COUNT 5 -#if EFI_WAVE_CHART || defined(__DOXYGEN__) +#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__) extern WaveChart waveChart; #endif extern bool hasFirmwareErrorFlag; @@ -154,13 +154,13 @@ static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index static msg_t waThread(void *arg) { (void)arg; chRegSetThreadName("Wave Analyzer"); -#if EFI_WAVE_CHART +#if EFI_ENGINE_SNIFFER while (TRUE) { chThdSleepSeconds(CHART_RESET_DELAY); waveChart.publishChartIfFull(); } -#endif /* EFI_WAVE_CHART */ +#endif /* EFI_ENGINE_SNIFFER */ #if defined __GNUC__ return -1; #endif diff --git a/firmware/development/wave_analyzer.h b/firmware/development/wave_analyzer.h index 872bd0f5d2..ef12e2ea0e 100644 --- a/firmware/development/wave_analyzer.h +++ b/firmware/development/wave_analyzer.h @@ -16,7 +16,7 @@ #include "datalogging.h" #include "digital_input_hw.h" -#include "wave_chart.h" +#include "engine_sniffer.h" #define WA_CHANNEL_1 "input1" #define WA_CHANNEL_2 "input2" diff --git a/win32_functional_tests/simulator/efifeatures.h b/win32_functional_tests/simulator/efifeatures.h index 652bf6523a..684c6f429a 100644 --- a/win32_functional_tests/simulator/efifeatures.h +++ b/win32_functional_tests/simulator/efifeatures.h @@ -38,7 +38,7 @@ #define EFI_ENGINE_CONTROL TRUE -#define EFI_WAVE_CHART TRUE +#define EFI_ENGINE_SNIFFER TRUE #define EFI_ANALOG_SENSORS TRUE diff --git a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp index 8c588d9170..f750ba045b 100644 --- a/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp +++ b/win32_functional_tests/simulator/rusEfiFunctionalTest.cpp @@ -17,7 +17,7 @@ #include "datalogging.h" #include "algo.h" #include "rpm_calculator.h" -#include "wave_chart.h" +#include "engine_sniffer.h" #include "status_loop.h" #include "trigger_emulator_algo.h" #include "main_trigger_callback.h"