mirror of https://github.com/FOME-Tech/fome-fw.git
check the real RPM at the instant the injector is about to open
This commit is contained in:
parent
81c1427c1e
commit
b558469d0e
|
@ -281,6 +281,14 @@ LimpState LimpManager::allowIgnition() const {
|
|||
return {true, ClearReason::None};
|
||||
}
|
||||
|
||||
bool LimpManager::asyncCutInjection() {
|
||||
if (!engineConfiguration->cutFuelOnHardLimit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isHardRevLimit(Sensor::getOrZero(SensorType::Rpm));
|
||||
}
|
||||
|
||||
float LimpManager::getTimeSinceAnyCut() const {
|
||||
return m_lastCutTime.getElapsedSeconds();
|
||||
}
|
||||
|
|
|
@ -121,6 +121,9 @@ public:
|
|||
LimpState allowInjection() const;
|
||||
LimpState allowIgnition() const;
|
||||
|
||||
// Last-minute check to determine whether to skip an injection due to hard rev limiter
|
||||
bool asyncCutInjection();
|
||||
|
||||
float getTimeSinceAnyCut() const;
|
||||
|
||||
bool allowTriggerInput() const;
|
||||
|
|
|
@ -53,7 +53,7 @@ void InjectorOutputPin::open(efitick_t nowNt) {
|
|||
LogTriggerInjectorState(nowNt, true);
|
||||
#endif // EFI_TOOTH_LOGGER
|
||||
|
||||
if (!engineConfiguration->asyncRevLimit || getLimpManager()->allowInjection().value) {
|
||||
if (!engineConfiguration->asyncRevLimit || !getLimpManager()->asyncCutInjection()) {
|
||||
setHigh();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue