From 19aebce4f2035bb5a167447f17208869b55f98d0 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 16 May 2022 09:08:02 -0700 Subject: [PATCH] Round system overheated temperature (#24544) * Update events.py * Apply suggestions from code review Co-authored-by: Willem Melching old-commit-hash: 961a121fde36fca88834e732fc50b34fbd82e94b --- selfdrive/controls/lib/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index d41751fd10..e493214c80 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -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: