From 8274b1e4ee58a3914cc17eaf37fdb8e4c8111fb9 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 31 May 2022 18:40:00 -0700 Subject: [PATCH] only check if youhave a sensor (#4223) --- firmware/controllers/limp_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/limp_manager.cpp b/firmware/controllers/limp_manager.cpp index 8cbdf810fe..cbb13af12f 100644 --- a/firmware/controllers/limp_manager.cpp +++ b/firmware/controllers/limp_manager.cpp @@ -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;