mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-09 17:43:42 +08:00
Update power_monitoring.py
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user