mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-03 00:53:44 +08:00
ui: Chevron: Round distance to whole number
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user