Skip to content

Commit

Permalink
wire up restoreConditionsMet #75
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jun 29, 2023
1 parent 59430df commit e03b240
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion firmware/controllers/math/lambda_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,17 @@ bool LambdaMonitorBase::isCurrentlyGood(float rpm, float load) const {
}

bool LambdaMonitorBase::restoreConditionsMet(float rpm, float load) const {
// TODO #75
if (rpm > engineConfiguration->lambdaProtectionRestoreRpm) {
return false;
}

if (load > engineConfiguration->lambdaProtectionRestoreLoad) {
return false;
}

if (Sensor::getOrZero(SensorType::Tps1) > engineConfiguration->lambdaProtectionRestoreTps) {
return false;
}

return true;
}

0 comments on commit e03b240

Please sign in to comment.