start/stop button improvements #6483

only: progress
This commit is contained in:
Andrey 2024-05-08 22:59:55 -04:00
parent 7c783e764c
commit 525570f896
2 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,7 @@ static void disengageStarterIfNeeded() {
void slowStartStopButtonCallback() {
if (!isIgnVoltage()) {
engine->startStopState.timeSinceIgnitionPower.reset();
// return;
return;
} else if (engine->startStopState.isFirstTime) {
engine->startStopState.isFirstTime = false;
}

View File

@ -10,6 +10,7 @@
TEST(start, startStop) {
std::unordered_map<SensorType, float> sensorVals = {{ SensorType::AcceleratorPedal, 0 }};
EngineTestHelper eth(engine_type_e::PROTEUS_BMW_M73, sensorVals);
Sensor::setMockValue(SensorType::BatteryVoltage, 15);
eth.moveTimeForwardAndInvokeEventsSec(1); // '0' time has special meaning for implementation so let's move forward
// pull-up means inverted value