Starter seems to be engaged forever #1965
This commit is contained in:
parent
a73b2c9298
commit
b95dd4311b
|
@ -141,24 +141,24 @@ etitick_t getTimeNowNt() {
|
|||
}
|
||||
*/
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
static void onStartStopButtonToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
engine->startStopStateToggleCounter++;
|
||||
|
||||
if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
if (engine->rpmCalculator.isStopped()) {
|
||||
bool wasStarterEngaged = enginePins.starterControl.getAndSet(1);
|
||||
if (!wasStarterEngaged) {
|
||||
scheduleMsg(&sharedLogger, "Let's crank this engine for up to %dseconds!", CONFIG(startCrankingDuration));
|
||||
}
|
||||
} else if (engine->rpmCalculator.isRunning()) {
|
||||
scheduleMsg(&sharedLogger, "Let's stop this engine!");
|
||||
scheduleStopEngine();
|
||||
doScheduleStopEngine(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
void slowStartStopButtonCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
#if EFI_PROD_CODE
|
||||
bool startStopState = startStopButtonDebounce.readPinEvent();
|
||||
|
||||
if (startStopState && !engine->startStopState) {
|
||||
|
@ -166,7 +166,6 @@ void slowStartStopButtonCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
onStartStopButtonToggle(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
engine->startStopState = startStopState;
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
// todo: should this be simply FSIO?
|
||||
if (engine->rpmCalculator.isRunning()) {
|
||||
|
|
Loading…
Reference in New Issue