From 44878b6db06a33f7043f81a7ed849d6d9a88e242 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 9 May 2024 21:46:53 -0500 Subject: [PATCH] wip --- selfdrive/thermald/thermald.py | 4 +++- selfdrive/ui/qt/home.cc | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 7d61cb3..bba05b0 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -209,7 +209,8 @@ def thermald_thread(end_event, hw_queue) -> None: offline_mode = device_management and params.get_bool("OfflineMode") # For testing a temporary overtemp notice - test_temp_count = 120 + # set to 100 to show + test_temp_count = 100 while not end_event.is_set(): sm.update(PANDA_STATES_TIMEOUT) @@ -328,6 +329,7 @@ def thermald_thread(end_event, hw_queue) -> None: extra_text = f"{offroad_comp_temp:.1f}C" show_alert = (not onroad_conditions["device_temp_good"] or not startup_conditions["device_temp_engageable"]) and onroad_conditions["ignition"] + # Test temperature warning if test_temp_count > 0: show_alert = True test_temp_count = test_temp_count - 1 diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index cecb16c..703f02f 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -244,6 +244,11 @@ void OffroadHome::refresh() { bool updateAvailable = update_widget->refresh(); int alerts = alerts_widget->refresh(); + if (alerts > 0 && !alerts_widget->isVisible()) { + update_notif->setVisible(true); + } else if (alerts == 0 && alerts_widget->isVisible()) { + update_notif->setVisible(false); + } // pop-up new notification // CLEARPILOT temp disabled update notifications