Starter is engaged on start-up in pull-up configuration #1969
usability & test improvement
This commit is contained in:
parent
ee51da64ad
commit
68c8d8c6a2
|
@ -150,7 +150,9 @@ static void onStartStopButtonToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
bool wasStarterEngaged = enginePins.starterControl.getAndSet(1);
|
||||
if (!wasStarterEngaged) {
|
||||
engine->startStopStateLastPushTime = getTimeNowNt();
|
||||
scheduleMsg(&sharedLogger, "Let's crank this engine for up to %dseconds!", CONFIG(startCrankingDuration));
|
||||
scheduleMsg(&sharedLogger, "Let's crank this engine for up to %d seconds via %s!",
|
||||
CONFIG(startCrankingDuration),
|
||||
hwPortname(CONFIG(starterControlPin)));
|
||||
}
|
||||
} else if (engine->rpmCalculator.isRunning()) {
|
||||
scheduleMsg(&sharedLogger, "Let's stop this engine!");
|
||||
|
|
|
@ -20,6 +20,12 @@ TEST(start, startStop) {
|
|||
slowStartStopButtonCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_FALSE(efiReadPin(engineConfiguration->starterControlPin));
|
||||
|
||||
// startup 'timeout' duration of time is a special case so let's sleep a bit
|
||||
eth.smartMoveTimeForwardSeconds(10);
|
||||
slowStartStopButtonCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_FALSE(efiReadPin(engineConfiguration->starterControlPin));
|
||||
|
||||
|
||||
|
||||
eth.smartMoveTimeForwardSeconds(10);
|
||||
// hit 'start' button! inverted since pull-up
|
||||
|
|
Loading…
Reference in New Issue