Round system overheated temperature (#24544)

* Update events.py

* Apply suggestions from code review

Co-authored-by: Willem Melching <willem.melching@gmail.com>
This commit is contained in:
Shane Smiskol
2022-05-16 09:08:02 -07:00
committed by GitHub
parent 8811142787
commit 961a121fde
+1 -1
View File
@@ -264,7 +264,7 @@ def overheat_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, sof
cpu = max(sm['deviceState'].cpuTempC, default=0.)
gpu = max(sm['deviceState'].gpuTempC, default=0.)
temp = max((cpu, gpu, sm['deviceState'].memoryTempC))
return NormalPermanentAlert("System Overheated", f"{temp} °C")
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: