thermald: fix temperature filter init (#28565)

old-commit-hash: 3072643363f3b48f9a3846c37e1da5e5d61cd93b
This commit is contained in:
Adeeb Shihadeh
2023-06-15 17:34:01 -07:00
committed by GitHub
parent df3dffc2d1
commit 42a4f610c2
+4 -4
View File
@@ -167,7 +167,7 @@ def thermald_thread(end_event, hw_queue):
off_ts = None
started_ts = None
started_seen = False
thermal_status = ThermalStatus.green
thermal_status = ThermalStatus.yellow
last_hw_state = HardwareState(
network_type=NetworkType.none,
@@ -179,8 +179,8 @@ def thermald_thread(end_event, hw_queue):
modem_temps=[],
)
all_temp_filter = FirstOrderFilter(0., TEMP_TAU, DT_TRML)
offroad_temp_filter = FirstOrderFilter(0., TEMP_TAU, DT_TRML)
all_temp_filter = FirstOrderFilter(0., TEMP_TAU, DT_TRML, initialized=False)
offroad_temp_filter = FirstOrderFilter(0., TEMP_TAU, DT_TRML, initialized=False)
should_start_prev = False
in_car = False
engaged_prev = False
@@ -242,7 +242,7 @@ def thermald_thread(end_event, hw_queue):
msg.deviceState.screenBrightnessPercent = HARDWARE.get_screen_brightness()
# this one is only used for offroad
# this subset is only used for offroad
temp_sources = [
msg.deviceState.memoryTempC,
max(msg.deviceState.cpuTempC),