bench test formatting

(cherry picked from commit c3971dc98a3aaa7f7dca6cb2b27dc721d4967f95)
This commit is contained in:
Matthew Kennedy 2023-05-29 13:31:39 -07:00 committed by rusefi
parent 24c48a77c6
commit 959f1b359d
1 changed files with 11 additions and 5 deletions

View File

@ -534,12 +534,18 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) {
}
void onConfigurationChangeBenchTest() {
if (engineConfiguration->benchTestOnTime == 0)
engineConfiguration->benchTestOnTime = 4; // default value if configuration was not specified
// default values if configuration was not specified
if (engineConfiguration->benchTestOnTime == 0) {
engineConfiguration->benchTestOnTime = 4;
}
if (engineConfiguration->benchTestOffTime < 5)
engineConfiguration->benchTestOffTime = 500; // default value if configuration was not specified
if (engineConfiguration->benchTestCount < 1)
engineConfiguration->benchTestCount = 3; // default value if configuration was not specified
engineConfiguration->benchTestOffTime = 500;
}
if (engineConfiguration->benchTestCount < 1) {
engineConfiguration->benchTestCount = 3;
}
}
void initBenchTest() {