Skip to content

Commit

Permalink
hardwared: allow empty temp fields
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Dec 7, 2024
1 parent ed222d0 commit d3063e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/hardware/hardwared.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ def hardware_thread(end_event, hw_queue) -> None:
# this subset is only used for offroad
temp_sources = [
msg.deviceState.memoryTempC,
max(msg.deviceState.cpuTempC),
max(msg.deviceState.gpuTempC),
max(msg.deviceState.cpuTempC, default=0.),
max(msg.deviceState.gpuTempC, default=0.),
]
offroad_comp_temp = offroad_temp_filter.update(max(temp_sources))

# this drives the thermal status while onroad
temp_sources.append(max(msg.deviceState.pmicTempC))
temp_sources.append(max(msg.deviceState.pmicTempC, default=0.))
all_comp_temp = all_temp_filter.update(max(temp_sources))
msg.deviceState.maxTempC = all_comp_temp

Expand Down

0 comments on commit d3063e9

Please sign in to comment.