Skip to content

Commit

Permalink
use inch for the americans
Browse files Browse the repository at this point in the history
  • Loading branch information
cydia2020 committed Oct 8, 2024
1 parent 471376b commit c4f6585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/onroad/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void ModelRenderer::drawLead(QPainter &painter, const cereal::RadarState::LeadDa

// convert lead distance + speed
QString v_abs_str = QString::number(std::nearbyint(v_abs * (scene.is_metric ? 3.6 : 2.2369362912))) + (scene.is_metric ? " km/h" : " mph");
QString d_rel_str = QString::number(std::nearbyint(d_rel * (scene.is_metric ? 1.0 : 1.093613))) + (scene.is_metric ? " m" : " yd");
QString d_rel_str = QString::number(std::nearbyint(d_rel * (scene.is_metric ? 1.0 : 3.28084))) + (scene.is_metric ? " m" : " in");

// combined texts
QString combined_velocity_distance = v_abs_str + "\n" + d_rel_str;
Expand Down

0 comments on commit c4f6585

Please sign in to comment.