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 ad2f6695f3
commit 6e50600a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;