Visuals - Model UI - 'Unlimited' Road UI Length
Extend the display of the path, lane lines, and road edges out as far as the model can see.
This commit is contained in:
parent
5aa41eddd8
commit
40abf95416
@ -90,7 +90,8 @@ void update_model(UIState *s,
|
|||||||
if (plan_position.getX().size() < model.getPosition().getX().size()) {
|
if (plan_position.getX().size() < model.getPosition().getX().size()) {
|
||||||
plan_position = model.getPosition();
|
plan_position = model.getPosition();
|
||||||
}
|
}
|
||||||
float max_distance = std::clamp(*(plan_position.getX().end() - 1),
|
float max_distance = scene.unlimited_road_ui_length ? *(plan_position.getX().end() - 1) :
|
||||||
|
std::clamp(*(plan_position.getX().end() - 1),
|
||||||
MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
|
MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
|
||||||
|
|
||||||
// update lane lines
|
// update lane lines
|
||||||
@ -390,6 +391,7 @@ void ui_update_frogpilot_params(UIState *s) {
|
|||||||
scene.path_edge_width = params.getInt("PathEdgeWidth");
|
scene.path_edge_width = params.getInt("PathEdgeWidth");
|
||||||
scene.path_width = params.getInt("PathWidth") / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f;
|
scene.path_width = params.getInt("PathWidth") / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f;
|
||||||
scene.road_edge_width = params.getInt("RoadEdgesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f;
|
scene.road_edge_width = params.getInt("RoadEdgesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f;
|
||||||
|
scene.unlimited_road_ui_length = scene.model_ui && params.getBool("UnlimitedLength");
|
||||||
|
|
||||||
bool quality_of_life_controls = params.getBool("QOLControls");
|
bool quality_of_life_controls = params.getBool("QOLControls");
|
||||||
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
||||||
|
@ -249,6 +249,7 @@ typedef struct UIScene {
|
|||||||
bool traffic_mode_active;
|
bool traffic_mode_active;
|
||||||
bool turn_signal_left;
|
bool turn_signal_left;
|
||||||
bool turn_signal_right;
|
bool turn_signal_right;
|
||||||
|
bool unlimited_road_ui_length;
|
||||||
bool use_kaofui_icons;
|
bool use_kaofui_icons;
|
||||||
bool use_si;
|
bool use_si;
|
||||||
bool use_vienna_slc_sign;
|
bool use_vienna_slc_sign;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user