This commit is contained in:
rusefillc 2022-11-28 13:53:51 -05:00
parent 5ed7a7bf00
commit b214f19701
1 changed files with 1 additions and 0 deletions

View File

@ -518,6 +518,7 @@ expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t obs
etbDutyRateOfChange = m_dutyIntegrator.accumulate(prevOutput - output);
prevOutput = output;
// seems good enough to simply check for both TPS sensors
bool isInputError = !Sensor::get(SensorType::Tps1).Valid || isTps2Error() || isPedalError();
if (Sensor::getOrZero(SensorType::Rpm) == 0 && wasInputError != isInputError) {
wasInputError = isInputError;