From 002f0566e45ec3486648b2401368bb97b8a70a0a 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 --- 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 19620cbf4b989d..52c513917b3843 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -262,7 +262,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: