diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index c4327e6c90..019fc83479 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -88,6 +88,11 @@ extern bool main_loop_started; #include "fsio_impl.h" #endif /* EFI_FSIO */ +#if EFI_ENGINE_SNIFFER +#include "engine_sniffer.h" +extern WaveChart waveChart; +#endif /* EFI_ENGINE_SNIFFER */ + // this 'true' value is needed for simulator static volatile bool fullLog = true; int warningEnabled = true; @@ -386,6 +391,10 @@ static void printOutPin(const char *pinName, brain_pin_e hwPin) { #endif /* EFI_PROD_CODE */ void printOverallStatus(systime_t nowSeconds) { +#if EFI_ENGINE_SNIFFER + waveChart.publishIfFull(); +#endif /* EFI_ENGINE_SNIFFER */ + /** * we report the version every 4 seconds - this way the console does not need to * request it and we will display it pretty soon diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index fc883675d3..7221f55115 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -793,7 +793,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) // help to notice when RAM usage goes up - if a code change adds to RAM usage these variables would fail // linking process which is the way to raise the alarm #ifndef RAM_UNUSED_SIZE -#define RAM_UNUSED_SIZE 14500 +#define RAM_UNUSED_SIZE 16000 #endif #ifndef CCM_UNUSED_SIZE #define CCM_UNUSED_SIZE 4600 diff --git a/firmware/development/wave_analyzer.cpp b/firmware/development/wave_analyzer.cpp index c0b8f3ceba..5ef9465876 100644 --- a/firmware/development/wave_analyzer.cpp +++ b/firmware/development/wave_analyzer.cpp @@ -48,7 +48,6 @@ static volatile efitime_t previousEngineCycleTimeUs = 0; static int waveReaderCount = 0; static WaveReader readers[MAX_ICU_COUNT]; -static THD_WORKING_AREA(waThreadStack, UTILITY_THREAD_STACK_SIZE); static Logging * logger; static void ensureInitialized(WaveReader *reader) { @@ -169,18 +168,6 @@ static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index previousEngineCycleTimeUs = nowUs; } -static THD_FUNCTION(waThread, arg) { - (void)arg; - chRegSetThreadName("Wave Analyzer"); -#if EFI_ENGINE_SNIFFER - while (true) { - chThdSleepSeconds(CHART_RESET_DELAY); - - waveChart.publishIfFull(); - } -#endif /* EFI_ENGINE_SNIFFER */ -} - /* static uint32_t getWaveLowWidth(int index) { WaveReader *reader = &readers[index]; @@ -286,9 +273,6 @@ void initWaveAnalyzer(Logging *sharedLogger) { addConsoleAction("waveinfo", showWaveInfo); addConsoleActionII("set_logic_input_mode", setWaveModeSilent); - - chThdCreateStatic(waThreadStack, sizeof(waThreadStack), NORMALPRIO, (tfunc_t)waThread, NULL); - #else print("wave disabled\r\n"); #endif