Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed May 16, 2022
1 parent 1c04423 commit b0ada25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ def out_of_space_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool,
def overheat_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
cpu = max(sm['deviceState'].cpuTempC, default=0.)
gpu = max(sm['deviceState'].gpuTempC, default=0.)
temp = round(max((cpu, gpu, sm['deviceState'].memoryTempC)))
return NormalPermanentAlert("System Overheated", f"{temp} °C")
temp = max((cpu, gpu, sm['deviceState'].memoryTempC))
return NormalPermanentAlert("System Overheated", f"{temp:.0f} °C")


def low_memory_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
Expand Down

0 comments on commit b0ada25

Please sign in to comment.