fix vBatt false-detection
This commit is contained in:
parent
628e0568f8
commit
0ce025b1f5
|
@ -522,7 +522,9 @@ void Engine::checkShutdown() {
|
|||
// if the ignition key is turned on again,
|
||||
// we cancel the shutdown mode, but only if all shutdown procedures are complete
|
||||
const float vBattThresholdOn = 8.0f;
|
||||
if ((Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE) > vBattThresholdOn) && !isInShutdownMode()) {
|
||||
// we fallback into zero instead of VBAT_FALLBACK_VALUE because it's not safe to false-trigger the "ignition on" event,
|
||||
// and we want to turn on the main relay only when 100% sure.
|
||||
if ((Sensor::get(SensorType::BatteryVoltage).value_or(0) > vBattThresholdOn) && !isInShutdownMode()) {
|
||||
ignitionOnTimeNt = getTimeNowNt();
|
||||
stopEngineRequestTimeNt = 0;
|
||||
efiPrintf("Ignition voltage detected! Cancel the engine shutdown!");
|
||||
|
|
Loading…
Reference in New Issue