From 063ab4af3531f4b5cd24443ddf80a043b123ea16 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 14 Aug 2021 11:52:20 -0400 Subject: [PATCH] dead FSIO --- firmware/controllers/algo/advance_map.cpp | 2 -- firmware/controllers/algo/engine_parts.h | 2 -- firmware/controllers/core/fsio_impl.cpp | 25 ----------------------- firmware/controllers/core/fsio_impl.h | 2 -- 4 files changed, 31 deletions(-) diff --git a/firmware/controllers/algo/advance_map.cpp b/firmware/controllers/algo/advance_map.cpp index 6d46a64685..029a092f25 100644 --- a/firmware/controllers/algo/advance_map.cpp +++ b/firmware/controllers/algo/advance_map.cpp @@ -94,14 +94,12 @@ angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { #if EFI_TUNER_STUDIO tsOutputChannels.debugFloatField1 = iatCorrection; tsOutputChannels.debugFloatField2 = engine->engineState.cltTimingCorrection; - tsOutputChannels.debugFloatField3 = engine->fsioState.fsioTimingAdjustment; tsOutputChannels.debugFloatField4 = pidTimingCorrection; tsOutputChannels.debugIntField1 = engine->engineState.multispark.count; #endif /* EFI_TUNER_STUDIO */ } return iatCorrection - + engine->fsioState.fsioTimingAdjustment + engine->engineState.cltTimingCorrection + pidTimingCorrection // todo: uncomment once we get usable knock - engine->knockCount diff --git a/firmware/controllers/algo/engine_parts.h b/firmware/controllers/algo/engine_parts.h index 1b02e8c8ff..7cddb82222 100644 --- a/firmware/controllers/algo/engine_parts.h +++ b/firmware/controllers/algo/engine_parts.h @@ -73,8 +73,6 @@ public: class FsioState { public: FsioState(); - float fsioTimingAdjustment = 0; - float servoValues[SERVO_COUNT]; float fsioLastValue[FSIO_COMMAND_COUNT]; float fsioRpmHardLimit; diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index 9426719830..fd49b844de 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -446,10 +446,6 @@ static bool updateValueOrWarning(int humanIndex, const char *msg, float *value D } } -static void useFsioForServo(int servoIndex DECLARE_ENGINE_PARAMETER_SUFFIX) { - updateValueOrWarning(8 + servoIndex, "servo", &engine->fsioState.servoValues[servoIndex] PASS_ENGINE_PARAMETER_SUFFIX); -} - /** * this method should be invoked periodically to calculate FSIO and toggle corresponding FSIO outputs */ @@ -501,30 +497,9 @@ void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } #endif /* EFI_ENABLE_CRITICAL_ENGINE_STOP */ - if (engineConfiguration->useFSIO16ForTimingAdjustment) { - updateValueOrWarning(MAGIC_OFFSET_FOR_TIMING_FSIO, "timing", &ENGINE(fsioState.fsioTimingAdjustment) PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->useFSIO6ForRevLimiter) { updateValueOrWarning(6, "rpm limit", &ENGINE(fsioState.fsioRpmHardLimit) PASS_ENGINE_PARAMETER_SUFFIX); } - - if (engineConfiguration->useFSIO8ForServo1) { - useFsioForServo(0 PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->useFSIO9ForServo2) { - useFsioForServo(1 PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->useFSIO10ForServo3) { - useFsioForServo(2 PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->useFSIO11ForServo4) { - useFsioForServo(3 PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->useFSIO12ForServo5) { - useFsioForServo(4 PASS_ENGINE_PARAMETER_SUFFIX); - } - } diff --git a/firmware/controllers/core/fsio_impl.h b/firmware/controllers/core/fsio_impl.h index 171c06250c..61d03c60b2 100644 --- a/firmware/controllers/core/fsio_impl.h +++ b/firmware/controllers/core/fsio_impl.h @@ -16,8 +16,6 @@ #define MAGIC_OFFSET_FOR_ENGINE_WARNING 4 // see useFSIO5ForCriticalIssueEngineStop #define MAGIC_OFFSET_FOR_CRITICAL_ENGINE 5 -// see useFSIO16ForTimingAdjustment -#define MAGIC_OFFSET_FOR_TIMING_FSIO 16 typedef Map3D fsio8_Map3D_f32t; typedef Map3D fsio8_Map3D_u8t;