From cd57e1fdb68e11f9e14adc8d3954b534d296e6b2 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 11 Nov 2021 20:16:34 -0500 Subject: [PATCH] Something something Automatic Compression Release #3442 --- firmware/controllers/algo/engine.h | 2 +- firmware/controllers/core/fsio_impl.cpp | 2 +- firmware/controllers/engine_cycle/main_trigger_callback.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 360496aedd..7b374fe563 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -94,7 +94,7 @@ public: AcState acState; bool enableOverdwellProtection = true; bool isPwmEnabled = true; - int triggerActivitySecond = -99; + int triggerActivityMs = -99 * 1000; const char *prevOutputName = nullptr; diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index cd23faea2a..33deb5da7a 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -720,7 +720,7 @@ void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } // see FUEL_PUMP_LOGIC if (isBrainPinValid(CONFIG(fuelPumpPin))) { - int triggerActivityOrEcuStartSecond = maxI(0, engine->triggerActivitySecond); + int triggerActivityOrEcuStartSecond = maxI(0, engine->triggerActivityMs / 1000); enginePins.fuelPumpRelay.setValue((getTimeNowSeconds() < triggerActivityOrEcuStartSecond + engineConfiguration->startUpFuelPumpDuration) || (engine->rpmCalculator.getRpm() > 0)); } diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index 282a91ab55..fc2a414507 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -403,7 +403,7 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp DECLARE */ enginePins.fuelPumpRelay.setValue(true); // quickly set pin right from the callback here! todo: would it work OK for smart SPI pin?! #if EFI_PROD_CODE - engine->triggerActivitySecond = getTimeNowSeconds(); + engine->triggerActivityMs = currentTimeMillis(); #endif // todo: check for 'trigger->is_synchnonized?' // TODO: add 'pin shutdown' invocation somewhere - coils might be still open here!