limp ClearReason
This commit is contained in:
parent
30463135a7
commit
a2844a2d37
|
@ -8,6 +8,7 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
|
|||
|
||||
// User-configured hard RPM limit
|
||||
if (rpm > engineConfiguration->rpmHardLimit) {
|
||||
warning(CUSTOM_OBD_NAN_INJECTION, "Hit hard limit %f", engineConfiguration->rpmHardLimit);
|
||||
if (engineConfiguration->cutFuelOnHardLimit) {
|
||||
allowFuel.clear(ClearReason::HardLimit);
|
||||
}
|
||||
|
@ -111,7 +112,7 @@ LimpState LimpManager::allowInjection() const {
|
|||
return {false, m_allowInjection.clearReason};
|
||||
}
|
||||
if (!m_transientAllowInjection) {
|
||||
return {false, ClearReason::Fatal};
|
||||
return {false, m_transientAllowInjection.clearReason};
|
||||
}
|
||||
return {true, ClearReason::None};
|
||||
}
|
||||
|
@ -121,7 +122,7 @@ LimpState LimpManager::allowIgnition() const {
|
|||
return {false, m_allowIgnition.clearReason};
|
||||
}
|
||||
if (!m_transientAllowIgnition) {
|
||||
return {false, ClearReason::Fatal};
|
||||
return {false, m_transientAllowIgnition.clearReason};
|
||||
}
|
||||
return {true, ClearReason::None};
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ enum class ClearReason : uint8_t {
|
|||
None, // 0
|
||||
Fatal,
|
||||
Settings,
|
||||
HardLimit,
|
||||
HardLimit, // 3
|
||||
FaultRevLimit,
|
||||
BoostCut, // 5
|
||||
OilPressure,
|
||||
|
@ -78,8 +78,8 @@ private:
|
|||
Clearable m_allowIgnition;
|
||||
Clearable m_allowTriggerInput;
|
||||
|
||||
bool m_transientAllowInjection = true;
|
||||
bool m_transientAllowIgnition = true;
|
||||
Clearable m_transientAllowInjection = true;
|
||||
Clearable m_transientAllowIgnition = true;
|
||||
|
||||
bool m_hadOilPressureAfterStart = false;
|
||||
};
|
||||
|
|
|
@ -3137,7 +3137,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "!https://rusefi.com/s/debugmode"
|
||||
field = "Debug mode", debugMode
|
||||
|
||||
dialog = limits, "Limits"
|
||||
dialog = limitsSettings, "Limits"
|
||||
field = "Cut fuel on RPM limit", cutFuelOnHardLimit
|
||||
field = "Cut spark on RPM limit", cutSparkOnHardLimit
|
||||
field = "RPM hard limit", rpmHardLimit, { cutFuelOnHardLimit || cutSparkOnHardLimit }
|
||||
|
@ -3154,7 +3154,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "Failed MAP sensor fallback", failedMapFallback, { !enableMapEstimationTableFallback }
|
||||
|
||||
dialog = limitsAndFallback, "Limits and fallbacks"
|
||||
panel = limits
|
||||
panel = limitsSettings
|
||||
panel = etbLimits
|
||||
panel = fallbacks
|
||||
|
||||
|
|
Loading…
Reference in New Issue