From b5906a76cdef7d821967f440a3d21b921f35e97f Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Fri, 10 May 2024 11:21:17 -0700 Subject: [PATCH] Controls - Device Management - Low Voltage Shutdown Threshold Automatically shut the device down when your battery reaches a specific voltage level to prevent killing your battery. --- selfdrive/thermald/power_monitoring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/thermald/power_monitoring.py b/selfdrive/thermald/power_monitoring.py index 389ef57..a56d7fc 100644 --- a/selfdrive/thermald/power_monitoring.py +++ b/selfdrive/thermald/power_monitoring.py @@ -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 < (max(frogpilot_toggles.low_voltage_shutdown, VBATT_PAUSE_CHARGING) * 1e3) and offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S) should_shutdown |= offroad_time > frogpilot_toggles.device_shutdown_time should_shutdown |= low_voltage_shutdown