From 44643838333fbc8d60bbaacc10a2d24378b6af70 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 23 Jun 2023 17:12:01 -0700 Subject: [PATCH] thermald: show temp value in offroad alert (#28664) * thermald: show temp value in offroad alert * update * better for multilang * update translations --------- Co-authored-by: Comma Device --- selfdrive/controls/lib/alerts_offroad.json | 2 +- selfdrive/thermald/thermald.py | 4 +++- selfdrive/ui/translations/main_de.ts | 8 ++++---- selfdrive/ui/translations/main_ja.ts | 8 ++++---- selfdrive/ui/translations/main_ko.ts | 8 ++++---- selfdrive/ui/translations/main_pt-BR.ts | 8 ++++---- selfdrive/ui/translations/main_zh-CHS.ts | 8 ++++---- selfdrive/ui/translations/main_zh-CHT.ts | 8 ++++---- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/selfdrive/controls/lib/alerts_offroad.json b/selfdrive/controls/lib/alerts_offroad.json index 62ab3d95a5..35446ca22b 100644 --- a/selfdrive/controls/lib/alerts_offroad.json +++ b/selfdrive/controls/lib/alerts_offroad.json @@ -1,6 +1,6 @@ { "Offroad_TemperatureTooHigh": { - "text": "Device temperature too high. System won't start.", + "text": "Device temperature too high. System cooling down before starting. Current internal component temperature: %1", "severity": 1 }, "Offroad_ConnectivityNeededPrompt": { diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index d3d53b7d89..30cee35f48 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -295,7 +295,9 @@ def thermald_thread(end_event, hw_queue): # if the temperature enters the danger zone, go offroad to cool down onroad_conditions["device_temp_good"] = thermal_status < ThermalStatus.danger - set_offroad_alert_if_changed("Offroad_TemperatureTooHigh", (not onroad_conditions["device_temp_good"])) + 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"] + set_offroad_alert_if_changed("Offroad_TemperatureTooHigh", show_alert, extra_text=extra_text) # TODO: this should move to TICI.initialize_hardware, but we currently can't import params there if TICI: diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts index d67def18e2..8ee679c73b 100644 --- a/selfdrive/ui/translations/main_de.ts +++ b/selfdrive/ui/translations/main_de.ts @@ -436,10 +436,6 @@ OffroadAlert - - Device temperature too high. System won't start. - - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 @@ -489,6 +485,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 8cae4dec1f..803a896d6d 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -435,10 +435,6 @@ OffroadAlert - - Device temperature too high. System won't start. - - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 @@ -488,6 +484,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 795f46aa30..1b692fb29a 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -435,10 +435,6 @@ OffroadAlert - - Device temperature too high. System won't start. - 장치 온도가 너무 높아 시스템을 시작할수 없습니다. - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 즉시 인터넷에 연결하여 업데이트를 확인하세요. 인터넷에 연결되어 있지 않으면 %1 이후에는 openpilot이 활성화되지 않습니다. @@ -489,6 +485,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. openpilot이 장치의 장착 위치 변경을 감지했습니다. 장치가 마운트에 완전히 장착되고 마운트가 앞유리에 단단히 고정되었는지 확인하십시오. + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 552a171f30..a28ab89c6d 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -436,10 +436,6 @@ OffroadAlert - - Device temperature too high. System won't start. - Temperatura do dispositivo muito alta. Sistema não iniciará. - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 Conecte-se imediatamente à internet para verificar se há atualizações. Se você não se conectar à internet em %1 não será possível acionar o openpilot. @@ -490,6 +486,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. O openpilot detectou uma mudança na posição de montagem do dispositivo. Verifique se o dispositivo está totalmente encaixado no suporte e se o suporte está firmemente preso ao para-brisa. + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 7ff99d1824..fce734dcb0 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -435,10 +435,6 @@ OffroadAlert - - Device temperature too high. System won't start. - - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 @@ -488,6 +484,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 924d43bd74..93fb346ed1 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -435,10 +435,6 @@ OffroadAlert - - Device temperature too high. System won't start. - 設備溫度過高,系統無法啟動。 - Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 請立即連接網路檢查更新。如果不連接網路,openpilot 將在 %1 後便無法使用。 @@ -489,6 +485,10 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. openpilot偵測到設備的安裝位置發生變化。請確保設備完全安裝在支架上,並確保支架牢固地固定在擋風玻璃上。 + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + OffroadHome