Skip to content

Commit

Permalink
Supported warning popups. (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ATATC committed Dec 12, 2024
1 parent 3ae2fe0 commit 9dcca5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion leads_vec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9dcca5f

Please sign in to comment.