only:minor simplification

This commit is contained in:
rusefillc 2023-11-17 15:46:28 -05:00
parent 49293137cc
commit 8a5c3eb5a1
1 changed files with 3 additions and 7 deletions

View File

@ -423,12 +423,12 @@ void Engine::efiWatchdog() {
if (isRunningPwmTest)
return;
if (module<PrimeController>()->isPriming()) {
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
if (module<PrimeController>()->isPriming() || triggerCentral.engineMovedRecently()) {
// do not invoke check in priming or if engine moved recently, no need to assert safe pin state.
return;
}
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
if (!getTriggerCentral()->isSpinningJustForWatchdog) {
if (!isRunningBenchTest() && enginePins.stopPins()) {
// todo: make this a firmwareError assuming functional tests would run
@ -441,10 +441,6 @@ void Engine::efiWatchdog() {
* todo: better watch dog implementation should be implemented - see
* http://sourceforge.net/p/rusefi/tickets/96/
*/
if (engine->triggerCentral.engineMovedRecently()) {
// Engine moved recently, no need to safe pins.
return;
}
getTriggerCentral()->isSpinningJustForWatchdog = false;
ignitionEvents.isReady = false;
#if EFI_PROD_CODE || EFI_SIMULATOR