From e72eb1d472fcd1f12b6e05c547a225bdd1cf5cd4 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 14 Jan 2022 14:06:21 +0100 Subject: [PATCH] thermald: remove brightness setting on ui crash (#23527) --- selfdrive/thermald/thermald.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 44facfbc59..c13d22f0e5 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -159,7 +159,7 @@ def thermald_thread() -> NoReturn: pandaState_timeout = int(1000 * 2.5 * DT_TRML) # 2.5x the expected pandaState frequency pandaState_sock = messaging.sub_sock('pandaStates', timeout=pandaState_timeout) - sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "managerState", "controlsState"]) + sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "controlsState"]) fan_speed = 0 count = 0 @@ -190,7 +190,6 @@ def thermald_thread() -> NoReturn: in_car = False handle_fan = None is_uno = False - ui_running_prev = False engaged_prev = False params = Params() @@ -396,12 +395,6 @@ def thermald_thread() -> NoReturn: time.sleep(10) HARDWARE.shutdown() - # If UI has crashed, set the brightness to reasonable non-zero value - ui_running = "ui" in (p.name for p in sm["managerState"].processes if p.running) - if ui_running_prev and not ui_running: - HARDWARE.set_screen_brightness(20) - ui_running_prev = ui_running - msg.deviceState.chargingError = current_filter.x > 0. and msg.deviceState.batteryPercent < 90 # if current is positive, then battery is being discharged msg.deviceState.started = started_ts is not None msg.deviceState.startedMonoTime = int(1e9*(started_ts or 0))