only check if youhave a sensor (#4223)

This commit is contained in:
Matthew Kennedy 2022-05-31 18:40:00 -07:00 committed by GitHub
parent deee8a382c
commit 8274b1e4ee
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
if (engine->rpmCalculator.isRunning()) {
uint16_t minOilPressure = engineConfiguration->minOilPressureAfterStart;
// Only check if the setting is enabled
if (minOilPressure > 0) {
// Only check if the setting is enabled and you have an oil pressure sensor
if (minOilPressure > 0 && Sensor::hasSensor(SensorType::OilPressure)) {
// Has it been long enough we should have pressure?
bool isTimedOut = engine->rpmCalculator.getSecondsSinceEngineStart(nowNt) > 5.0f;