diff --git a/starpilot/ui/qt/offroad/lateral_settings.cc b/starpilot/ui/qt/offroad/lateral_settings.cc index d8f0eb214..40e673143 100644 --- a/starpilot/ui/qt/offroad/lateral_settings.cc +++ b/starpilot/ui/qt/offroad/lateral_settings.cc @@ -51,6 +51,7 @@ StarPilotLateralPanel::StarPilotLateralPanel(StarPilotSettingsWindow *parent, bo {"MinimumLaneChangeSpeed", tr("Minimum Lane Change Speed"), tr("Lowest speed at which openpilot will change lanes."), ""}, {"LaneDetectionWidth", tr("Minimum Lane Width"), tr("Prevent automatic lane changes into lanes narrower than the set width."), ""}, {"OneLaneChange", tr("One Lane Change Per Signal"), tr("Limit automatic lane changes to one per turn-signal activation."), ""}, + {"LaneChangeSmoothing", tr("Lane Change Smoothing"), tr("Controls how smoothly openpilot commits to a lane change. 10 is stock behavior; lower values produce a gentler, more gradual maneuver. 1 stretches the maneuver to ~8 seconds."), ""}, {"LateralTune", tr("Lateral Tuning"), tr("Miscellaneous steering control changes to fine-tune how openpilot drives."), "../../starpilot/assets/toggle_icons/icon_lateral_tune.png"}, {"TurnDesires", tr("Force Turn Desires Below Lane Change Speed"), tr("While driving below the minimum lane change speed with an active turn signal, instruct openpilot to turn left/right."), ""}, @@ -111,6 +112,11 @@ StarPilotLateralPanel::StarPilotLateralPanel(StarPilotSettingsWindow *parent, bo lateralToggle = new StarPilotParamValueControl(param, title, desc, icon, 0, 15, QString(), std::map(), 0.1, true); } else if (param == "MinimumLaneChangeSpeed") { lateralToggle = new StarPilotParamValueControl(param, title, desc, icon, 0, 99, QString(), std::map(), 1, true); + } else if (param == "LaneChangeSmoothing") { + std::map smoothingLabels; + smoothingLabels[10] = tr("Stock"); + smoothingLabels[1] = tr("Smoothest"); + lateralToggle = new StarPilotParamValueControl(param, title, desc, icon, 1, 10, QString(), smoothingLabels, 1); } else if (param == "LateralTune") { StarPilotManageControl *lateralTuneToggle = new StarPilotManageControl(param, title, desc, icon); diff --git a/starpilot/ui/qt/offroad/lateral_settings.h b/starpilot/ui/qt/offroad/lateral_settings.h index 7c4b743fb..9e4238672 100644 --- a/starpilot/ui/qt/offroad/lateral_settings.h +++ b/starpilot/ui/qt/offroad/lateral_settings.h @@ -26,7 +26,7 @@ private: QSet advancedLateralTuneKeys = {"ForceAutoTune", "ForceAutoTuneOff", "ForceTorqueController", "SteerDelay", "SteerFriction", "SteerLatAccel", "SteerKP", "SteerRatio"}; QSet aolKeys = {"AlwaysOnLateralLKAS", "PauseAOLOnBrake"}; - QSet laneChangeKeys = {"LaneChangeTime", "LaneDetectionWidth", "MinimumLaneChangeSpeed", "NudgelessLaneChange", "OneLaneChange"}; + QSet laneChangeKeys = {"LaneChangeSmoothing", "LaneChangeTime", "LaneDetectionWidth", "MinimumLaneChangeSpeed", "NudgelessLaneChange", "OneLaneChange"}; QSet lateralTuneKeys = {"NNFF", "NNFFLite", "TurnDesires"}; QSet qolKeys = {"PauseLateralSpeed"};