mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-07 01:06:01 +08:00
Controls - Device Management - Device Shutdown Timer
Configure how quickly the device shuts down after going offroad.
This commit is contained in:
@@ -116,7 +116,7 @@ class PowerMonitoring:
|
||||
offroad_time = (now - offroad_timestamp)
|
||||
low_voltage_shutdown = (self.car_voltage_mV < (VBATT_PAUSE_CHARGING * 1e3) and
|
||||
offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S)
|
||||
should_shutdown |= offroad_time > MAX_TIME_OFFROAD_S
|
||||
should_shutdown |= offroad_time > frogpilot_toggles.device_shutdown_time
|
||||
should_shutdown |= low_voltage_shutdown
|
||||
should_shutdown |= (self.car_battery_capacity_uWh <= 0)
|
||||
should_shutdown &= not ignition
|
||||
|
||||
Reference in New Issue
Block a user