From ba0cc91318a6b9cefd2196ac80ae9cf8eacb7fcf Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Wed, 17 Apr 2024 23:28:32 -0400 Subject: [PATCH] ui: Chevron: Round distance to whole number --- selfdrive/ui/qt/onroad.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index dc091422df..eb743c16d9 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -1888,7 +1888,7 @@ void AnnotatedCameraWidget::drawLead(QPainter &painter, const cereal::RadarState if (num == 0) { // Display metrics to the 0th lead car QStringList chevron_text[2]; if (chevron_data == 1 || chevron_data == 3) { - chevron_text[0].append(QString::number(radar_d_rel,'f', 1) + " " + "m"); + chevron_text[0].append(QString::number(radar_d_rel,'f', 0) + " " + "m"); } if (chevron_data == 2 || chevron_data == 3) { chevron_text[chevron_data - 2].append(QString::number((radar_v_rel + v_ego) * (isMetric ? MS_TO_KPH : MS_TO_MPH),'f', 0) + " " + (isMetric ? "km/h" : "mph"));