From d897a96c0574f445081d35a5a26366f12e1abadc Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 3 Mar 2023 05:05:50 -0500 Subject: [PATCH] is this just dead? (cherry picked from commit cd6b770945aa56ae52e188476034a862cba47bb0) --- firmware/console/status_loop.cpp | 10 ++-------- firmware/controllers/engine_cycle/spark_logic.cpp | 6 ------ firmware/controllers/engine_cycle/spark_logic.h | 2 -- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index dbd182c7b6..5dfd130303 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -224,12 +224,6 @@ static Logging logicAnalyzerLogger("logic analyzer", logicAnalyzerBuffer, sizeof * todo: is this mostly dead code? */ void updateDevConsoleState() { - // todo: make SWO work -// char *msg = "hello\r\n"; -// for(int i=0;ioutputChannels.VBatt = Sensor::getOrZero(SensorType::BatteryVoltage); - + engine->outputChannels.idlePositionSensor = Sensor::getOrZero(SensorType::IdlePosition); engine->outputChannels.wastegatePositionSensor = Sensor::getOrZero(SensorType::WastegatePosition); diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index 0f7be4795c..6d778ac455 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -30,14 +30,8 @@ extern bool verboseMode; extern bool printFuelDebug; #endif // EFI_PRINTF_FUEL_DETAILS -static cyclic_buffer ignitionErrorDetection; - static const char *prevSparkName = nullptr; -int isIgnitionTimingError(void) { - return ignitionErrorDetection.sum(6) > 4; -} - static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *output) { #if SPARK_EXTREME_LOGGING efiPrintf("spark goes low %d %s %d current=%d cnt=%d id=%d", getRevolutionCounter(), output->name, (int)getTimeNowUs(), diff --git a/firmware/controllers/engine_cycle/spark_logic.h b/firmware/controllers/engine_cycle/spark_logic.h index b82f0093fc..e8735d105c 100644 --- a/firmware/controllers/engine_cycle/spark_logic.h +++ b/firmware/controllers/engine_cycle/spark_logic.h @@ -13,5 +13,3 @@ void fireSparkAndPrepareNextSchedule(IgnitionEvent *event); int getNumberOfSparks(ignition_mode_e mode); percent_t getCoilDutyCycle(int rpm); void initializeIgnitionActions(); - -int isIgnitionTimingError(void);