gear ratio can't be negative, it's unsigned

This commit is contained in:
Matthew Kennedy 2023-03-17 01:58:47 -07:00
parent 4bad56b2c2
commit 37bf5400f7
1 changed files with 0 additions and 8 deletions

View File

@ -19,14 +19,6 @@ void GearDetector::onConfigurationChange(engine_configuration_s const * /*previo
return;
}
// validate gears
for (size_t i = 0; i < gearCount; i++) {
if (engineConfiguration->gearRatio[i] <= 0) {
firmwareError(OBD_PCM_Processor_Fault, "Invalid gear ratio for #%d", i + 1);
return;
}
}
for (int i = 0; i < gearCount - 1; i++) {
// Threshold i is the threshold between gears i and i+1
float gearI = engineConfiguration->gearRatio[i];