From 2569b85b65c724798a8081358bb6a3584fea508f Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 15 Jul 2021 00:25:41 -0400 Subject: [PATCH] making code more testable --- firmware/controllers/settings.cpp | 7 +++---- firmware/controllers/settings.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 4d90ff8703..6839c92f42 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -167,7 +167,7 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) { #endif /* EFI_PROD_CODE */ } -static void doPrintConfiguration() { +static void doPrintConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { printConfiguration(engineConfiguration); } @@ -183,7 +183,7 @@ static void setTimingMode(int value) { incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE); } -void setEngineType(int value) { +void setEngineType(int value DECLARE_ENGINE_PARAMETER_SUFFIX) { { chibios_rt::CriticalSectionLocker csl; @@ -193,8 +193,7 @@ void setEngineType(int value) { #if EFI_INTERNAL_FLASH writeToFlashNow(); - // scheduleReset(); - #endif /* EFI_PROD_CODE */ + #endif /* EFI_INTERNAL_FLASH */ } incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE); doPrintConfiguration(); diff --git a/firmware/controllers/settings.h b/firmware/controllers/settings.h index 39d9ba983d..4452fd2ea9 100644 --- a/firmware/controllers/settings.h +++ b/firmware/controllers/settings.h @@ -16,7 +16,7 @@ void printConfiguration(const engine_configuration_s *engineConfiguration); void scheduleStopEngine(void); void setCallFromPitStop(int durationMs); void printTPSInfo(void); -void setEngineType(int value); +void setEngineType(int value DECLARE_ENGINE_PARAMETER_SUFFIX); /** * See also getEngine_type_e() */