making code more testable

This commit is contained in:
Andrey 2021-07-15 00:25:41 -04:00
parent b65c4b5612
commit 2569b85b65
2 changed files with 4 additions and 5 deletions

View File

@ -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();

View File

@ -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()
*/