only:requireFootOnBrakeToCrank and isCrankingSuppressed
This commit is contained in:
parent
14f57d9b5a
commit
9d8c4f195c
|
@ -49,6 +49,10 @@ static void disengageStarterIfNeeded() {
|
|||
}
|
||||
}
|
||||
|
||||
PUBLIC_API_WEAK bool isCrankingSuppressed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void slowStartStopButtonCallback() {
|
||||
if (!isIgnVoltage()) {
|
||||
// nothing to crank if we are powered only via USB
|
||||
|
@ -65,6 +69,14 @@ void slowStartStopButtonCallback() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (engineConfiguration->requireFootOnBrakeToCrank && !engine->brakePedalSwitchedState) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCrankingSuppressed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool startStopState = engine->startStopState.startStopButtonDebounce.readPinEvent();
|
||||
|
||||
if (startStopState && !engine->engineState.startStopState) {
|
||||
|
|
Loading…
Reference in New Issue