From 1913853adb8f7dfe03556a796e20bb2456f21ce5 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 7 Aug 2024 12:03:10 -0700 Subject: [PATCH] more dead efifeatures --- firmware/console/eficonsole.cpp | 3 --- firmware/development/engine_sniffer.cpp | 14 ++------------ firmware/util/math/interpolation.cpp | 5 +---- simulator/simulator/efifeatures.h | 5 ----- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/firmware/console/eficonsole.cpp b/firmware/console/eficonsole.cpp index aad5de2d2e..dd17a0a3aa 100644 --- a/firmware/console/eficonsole.cpp +++ b/firmware/console/eficonsole.cpp @@ -156,9 +156,6 @@ void initializeConsole() { sayHello(); addConsoleAction("test", [](){ /* do nothing */}); addConsoleAction("hello", sayHello); -#if EFI_HAS_RESET - addConsoleAction("reset", scheduleReset); -#endif addConsoleAction("critical", testCritical); addConsoleAction("error", myerror); diff --git a/firmware/development/engine_sniffer.cpp b/firmware/development/engine_sniffer.cpp index 8d8e7ab907..4c115caa3e 100644 --- a/firmware/development/engine_sniffer.cpp +++ b/firmware/development/engine_sniffer.cpp @@ -58,8 +58,6 @@ static char WAVE_LOGGING_BUFFER[WAVE_LOGGING_SIZE]; int waveChartUsedSize; -//#define DEBUG_WAVE 1 - /** * We want to skip some engine cycles to skip what was scheduled before parameters were changed */ @@ -82,9 +80,6 @@ void WaveChart::init() { } void WaveChart::reset() { -#if DEBUG_WAVE - efiPrintf("reset while at ", counter); -#endif /* DEBUG_WAVE */ logging.reset(); counter = 0; startTimeNt = 0; @@ -141,10 +136,7 @@ void WaveChart::publish() { #if EFI_ENGINE_SNIFFER logging.appendPrintf( LOG_DELIMITER); waveChartUsedSize = logging.loggingSize(); -#if DEBUG_WAVE - Logging *l = &chart->logging; - efiPrintf("IT'S TIME", strlen(l->buffer)); -#endif // DEBUG_WAVE + if (getTriggerCentral()->isEngineSnifferEnabled) { scheduleLogging(&logging); } @@ -181,9 +173,7 @@ void WaveChart::addEvent3(const char *name, const char * msg) { #endif /* EFI_PROD_CODE */ efiAssertVoid(ObdCode::CUSTOM_ERR_6653, isInitialized, "chart not initialized"); -#if DEBUG_WAVE - efiPrintf("current", chart->counter); -#endif /* DEBUG_WAVE */ + if (isFull()) { return; } diff --git a/firmware/util/math/interpolation.cpp b/firmware/util/math/interpolation.cpp index 923e2a32c2..88216a896e 100644 --- a/firmware/util/math/interpolation.cpp +++ b/firmware/util/math/interpolation.cpp @@ -53,10 +53,7 @@ float interpolateMsg(const char *msg, float x1, float y1, float x2, float y2, fl } float b = y1 - a * x1; float result = a * x + b; -#if DEBUG_FUEL - printf("x1=%.2f y1=%.2f x2=%.2f y2=%.2f\r\n", x1, y1, x2, y2); - printf("a=%.2f b=%.2f result=%.2f\r\n", a, b, result); -#endif + return result; } diff --git a/simulator/simulator/efifeatures.h b/simulator/simulator/efifeatures.h index 23bfaa874b..8e98a62687 100644 --- a/simulator/simulator/efifeatures.h +++ b/simulator/simulator/efifeatures.h @@ -105,11 +105,6 @@ #define HAL_TRIGGER_USE_PAL FALSE #endif /* HAL_TRIGGER_USE_PAL */ -#define EFI_HAS_RESET FALSE -#define EXTREME_TERM_LOGGING FALSE -#define DEBUG_FUEL FALSE -#define DEBUG_WAVE FALSE - #define EFI_DEFAILED_LOGGING FALSE #define EFI_ENGINE_SNIFFER TRUE