From 9dcca5f79a75aa55bd98a5e6774d32c319578b37 Mon Sep 17 00:00:00 2001 From: ATATC Date: Wed, 11 Dec 2024 20:00:25 -0500 Subject: [PATCH] Supported warning popups. (#456) --- leads_vec/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/leads_vec/cli.py b/leads_vec/cli.py index f1c9aea..f6921c2 100644 --- a/leads_vec/cli.py +++ b/leads_vec/cli.py @@ -270,7 +270,10 @@ def switch_esc_mode(mode: str) -> None: class IdleUpdate(FrequencyGenerator): @_override def do(self) -> None: - cpu_temp = get_device("cpu").read()["temp"] if has_device("cpu") else "?" + cpu_temp = get_device("cpu").read()["temp"] if has_device("cpu") else 0 + if cpu_temp > 90: + L.warn("! CPU OVERHEATING, PULL OVER RIGHT NOW !") + set_debug_window(uim, var_debug, True) var_info.set(f"VeC {__version__.upper()}\n\n" f"{_datetime.now().strftime("%Y-%m-%d %H:%M:%S")}\n" f"{format_duration(duration := _time() - w.runtime_data().start_time)} {cpu_temp} °C\n"