mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-01 05:33:49 +08:00
Low-Voltage Cutoff
This commit is contained in:
@@ -114,7 +114,7 @@ class PowerMonitoring:
|
||||
now = time.monotonic()
|
||||
should_shutdown = False
|
||||
offroad_time = (now - offroad_timestamp)
|
||||
low_voltage_shutdown = (self.car_voltage_mV < (VBATT_PAUSE_CHARGING * 1e3) and
|
||||
low_voltage_shutdown = (self.car_voltage_mV < (frogpilot_toggles.low_voltage_shutdown * 1e3) and
|
||||
offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S)
|
||||
should_shutdown |= offroad_time > frogpilot_toggles.device_shutdown_time
|
||||
should_shutdown |= low_voltage_shutdown
|
||||
|
||||
Reference in New Issue
Block a user