diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index a68c8d271c..7305bb9cb3 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -21,6 +21,10 @@ */ #define NO_PWM 0 + +// see useFSIO16ForTimingAdjustment +#define MAGIC_OFFSET_FOR_TIMING_FSIO 15 + fsio8_Map3D_f32t fsioTable1("fsio#1"); fsio8_Map3D_u8t fsioTable2("fsio#2"); fsio8_Map3D_u8t fsioTable3("fsio#3"); @@ -401,7 +405,13 @@ void runFsio(void) { setPinState("fan", &enginePins.fanRelay, radiatorFanLogic); } if (engineConfiguration->useFSIO16ForTimingAdjustment) { + LEElement * element = fsioLogics[MAGIC_OFFSET_FOR_TIMING_FSIO]; + if (element == NULL) { + warning(CUSTOM_FSIO_INVALID_EXPRESSION, "invalid expression for %s", "timing"); + } else { + engine->fsioTimingAdjustment = calc.getValue2(engine->fsioTimingAdjustment, element PASS_ENGINE_PARAMETER_SUFFIX); + } } }