Update power_monitoring.py

This commit is contained in:
eFini
2023-03-30 09:01:53 +08:00
committed by GitHub
parent eeb43a5107
commit c0ac87c36c
+1 -1
View File
@@ -190,7 +190,7 @@ class PowerMonitoring:
should_shutdown = False
# Wait until we have shut down charging before powering down
should_shutdown |= (not panda_charging and self.should_disable_charging(ignition, in_car, offroad_timestamp))
should_shutdown |= (not panda_charging and self.should_disable_charging(ignition, in_car, offroad_timestamp, started_seen))
# should_shutdown |= ((HARDWARE.get_battery_capacity() < BATT_PERC_OFF) and (not HARDWARE.get_battery_charging()) and ((now - offroad_timestamp) > 60))
should_shutdown &= started_seen or (now > MIN_ON_TIME_S)
return should_shutdown