only check if youhave a sensor (#4223)
This commit is contained in:
parent
deee8a382c
commit
8274b1e4ee
|
@ -47,8 +47,8 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
|
||||||
if (engine->rpmCalculator.isRunning()) {
|
if (engine->rpmCalculator.isRunning()) {
|
||||||
uint16_t minOilPressure = engineConfiguration->minOilPressureAfterStart;
|
uint16_t minOilPressure = engineConfiguration->minOilPressureAfterStart;
|
||||||
|
|
||||||
// Only check if the setting is enabled
|
// Only check if the setting is enabled and you have an oil pressure sensor
|
||||||
if (minOilPressure > 0) {
|
if (minOilPressure > 0 && Sensor::hasSensor(SensorType::OilPressure)) {
|
||||||
// Has it been long enough we should have pressure?
|
// Has it been long enough we should have pressure?
|
||||||
bool isTimedOut = engine->rpmCalculator.getSecondsSinceEngineStart(nowNt) > 5.0f;
|
bool isTimedOut = engine->rpmCalculator.getSecondsSinceEngineStart(nowNt) > 5.0f;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue