From 696497c6e4f145abfd57cb0be2e979fd23805cfb Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sat, 22 Jun 2024 14:45:04 +0200 Subject: [PATCH] Update sunnylink error logging and status display Updated the error logging in sunnylink.py to include the module name for clarity. In addition, adjusted the status display in sidebar.cc to shorten the "REGISTERING" status text for a cleaner user interface. --- common/api/sunnylink.py | 2 +- selfdrive/ui/qt/sidebar.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/api/sunnylink.py b/common/api/sunnylink.py index 76cc6f21d7..d7a83c1530 100644 --- a/common/api/sunnylink.py +++ b/common/api/sunnylink.py @@ -124,7 +124,7 @@ class SunnylinkApi(BaseApi): self._status_update(f"Waiting {backoff}s before retry, Exception occurred during registration: [{str(e)}]") with open('/data/community/crashes/error.txt', 'a') as f: - f.write(f"{datetime.now()}: {str(e)}\n") + f.write(f"[{datetime.now()}] sunnylink: {str(e)}\n") backoff = min(backoff * 2, 60) time.sleep(backoff) diff --git a/selfdrive/ui/qt/sidebar.cc b/selfdrive/ui/qt/sidebar.cc index 0e6409bbb5..8d45e62ce4 100644 --- a/selfdrive/ui/qt/sidebar.cc +++ b/selfdrive/ui/qt/sidebar.cc @@ -166,7 +166,7 @@ void Sidebar::updateState(const UIState &s) { if (sunnylink_enabled && last_sunnylink_ping == 0) { // If sunnylink is enabled, but we don't have a dongle id, and we haven't received a ping yet, we are registering - status = sl_dongle_id.has_value() ? tr("OFFLINE") : tr("REGISTERING"); + status = sl_dongle_id.has_value() ? tr("OFFLINE") : tr("REGIST..."); color = sl_dongle_id.has_value() ? warning_color : progress_color; } else if (sunnylink_enabled) { // If sunnylink is enabled, we are considered online if we have received a ping in the last 80 seconds, else error.