Visuals - Quality of Life - Use Wheel Speed
Use the wheel speed instead of the cluster speed in the onroad UI.
This commit is contained in:
parent
61495da103
commit
efb2be1900
|
@ -62,7 +62,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
|||
|
||||
// Handle older routes where vEgoCluster is not set
|
||||
v_ego_cluster_seen = v_ego_cluster_seen || car_state.getVEgoCluster() != 0.0;
|
||||
float v_ego = v_ego_cluster_seen ? car_state.getVEgoCluster() : car_state.getVEgo();
|
||||
float v_ego = v_ego_cluster_seen && !s.scene.wheel_speed ? car_state.getVEgoCluster() : car_state.getVEgo();
|
||||
speed = cs_alive ? std::max<float>(0.0, v_ego) : 0.0;
|
||||
speed *= s.scene.is_metric ? MS_TO_KPH : MS_TO_MPH;
|
||||
|
||||
|
|
|
@ -426,6 +426,7 @@ void ui_update_frogpilot_params(UIState *s, Params ¶ms) {
|
|||
scene.hide_speed_ui = scene.hide_speed && params.getBool("HideSpeedUI");
|
||||
scene.map_style = quality_of_life_visuals ? params.getInt("MapStyle") : 0;
|
||||
scene.stopped_timer = quality_of_life_visuals && params.getBool("StoppedTimer");
|
||||
scene.wheel_speed = quality_of_life_visuals && params.getBool("WheelSpeed");
|
||||
|
||||
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
||||
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
||||
|
|
|
@ -202,6 +202,7 @@ typedef struct UIScene {
|
|||
bool use_si;
|
||||
bool use_vienna_slc_sign;
|
||||
bool vtsc_controlling_curve;
|
||||
bool wheel_speed;
|
||||
|
||||
double fps;
|
||||
|
||||
|
|
Loading…
Reference in New Issue