From 03fa5d716bb8d3521d943cc835fd69ec5c58d02b Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 19 Mar 2017 18:04:59 -0400 Subject: [PATCH] improving internal consistency validation --- firmware/controllers/flash_main.cpp | 3 ++- firmware/rusefi.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/flash_main.cpp b/firmware/controllers/flash_main.cpp index 7c7d86a6b8..243e969b22 100644 --- a/firmware/controllers/flash_main.cpp +++ b/firmware/controllers/flash_main.cpp @@ -93,6 +93,7 @@ void writeToFlashNow(void) { } else { scheduleMsg(logger, "Flashing failed"); } + assertEngineReference(PASS_ENGINE_PARAMETER_F); maxLockTime = 0; } @@ -127,7 +128,7 @@ static persisted_configuration_state_e doReadConfiguration(flashaddr_t address, */ persisted_configuration_state_e readConfiguration(Logging * logger) { efiAssert(getRemainingStack(chThdSelf()) > 256, "read f", PC_ERROR); - + assertEngineReference(PASS_ENGINE_PARAMETER_F); persisted_configuration_state_e result = doReadConfiguration(FLASH_ADDR, logger); if (result != PC_OK) { printMsg(logger, "Reading second configuration copy"); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 9bc8d522e5..6e573d980e 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -151,6 +151,7 @@ static void scheduleReboot(void) { void runRusEfi(void) { efiAssertVoid(getRemainingStack(chThdSelf()) > 512, "init s"); + assertEngineReference(PASS_ENGINE_PARAMETER_F); initIntermediateLoggingBuffer(); initErrorHandling(); @@ -161,7 +162,7 @@ void runRusEfi(void) { * while reading configuration */ initTriggerDecoderLogger(&sharedLogger); -#endif +#endif /* EFI_SHAFT_POSITION_INPUT */ /** * we need to initialize table objects before default configuration can set values