From 5b7bbfa82dd26f95cee1c79d730b7b036b833242 Mon Sep 17 00:00:00 2001 From: nayan Date: Mon, 13 Oct 2025 11:04:18 -0400 Subject: [PATCH] Trim Roadname UI to 30 chars --- selfdrive/ui/sunnypilot/qt/onroad/hud.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc index 3ed8feb993..ca540754d5 100644 --- a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc +++ b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc @@ -51,6 +51,7 @@ void HudRendererSP::updateState(const UIState &s) { roadName = s.scene.road_name; if (sm.updated("liveMapDataSP")) { roadNameStr = QString::fromStdString(lmd.getRoadName()); + if (roadNameStr.length() > 30) roadNameStr = roadNameStr.left(30).append("..."); speedLimitAheadValid = lmd.getSpeedLimitAheadValid(); speedLimitAhead = lmd.getSpeedLimitAhead() * speedConv; speedLimitAheadDistance = lmd.getSpeedLimitAheadDistance();