wip
This commit is contained in:
@@ -209,7 +209,8 @@ def thermald_thread(end_event, hw_queue) -> None:
|
|||||||
offline_mode = device_management and params.get_bool("OfflineMode")
|
offline_mode = device_management and params.get_bool("OfflineMode")
|
||||||
|
|
||||||
# For testing a temporary overtemp notice
|
# 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():
|
while not end_event.is_set():
|
||||||
sm.update(PANDA_STATES_TIMEOUT)
|
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"
|
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"]
|
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:
|
if test_temp_count > 0:
|
||||||
show_alert = True
|
show_alert = True
|
||||||
test_temp_count = test_temp_count - 1
|
test_temp_count = test_temp_count - 1
|
||||||
|
|||||||
@@ -244,6 +244,11 @@ void OffroadHome::refresh() {
|
|||||||
|
|
||||||
bool updateAvailable = update_widget->refresh();
|
bool updateAvailable = update_widget->refresh();
|
||||||
int alerts = alerts_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
|
// pop-up new notification
|
||||||
// CLEARPILOT temp disabled update notifications
|
// CLEARPILOT temp disabled update notifications
|
||||||
|
|||||||
Reference in New Issue
Block a user