diff --git a/selfdrive/ui/layouts/settings/starpilot/longitudinal.py b/selfdrive/ui/layouts/settings/starpilot/longitudinal.py index a7e1408ba..1a1d3587c 100644 --- a/selfdrive/ui/layouts/settings/starpilot/longitudinal.py +++ b/selfdrive/ui/layouts/settings/starpilot/longitudinal.py @@ -172,10 +172,6 @@ class StarPilotLongitudinalLayout(_SettingsPage): subtitle=tr_noop("Automatically slow down for upcoming curves based on learned road data."), get_value=lambda: tr_noop("Configure"), navigate_to="curve"), - SettingRow("WeatherNav", "value", tr_noop("Weather"), - subtitle=tr_noop("Adjust following distance, acceleration, and curve speed for weather conditions."), - get_value=lambda: tr_noop("Configure"), - navigate_to="weather"), ], tab_key="adaptive"), # ── Limits tab ── @@ -277,6 +273,16 @@ class StarPilotLongitudinalLayout(_SettingsPage): get_state=lambda: self._params.get_bool("MapDeceleration"), set_state=lambda s: self._params.put_bool("MapDeceleration", s), visible=lambda: self._params.get_bool("QOLLongitudinal") and self._params.get_bool("MapGears")), + SettingRow("WeatherPresets", "toggle", tr_noop("Weather Condition Offsets"), + subtitle=tr_noop("Automatically adjust driving behavior based on real-time weather."), + get_state=lambda: self._params.get_bool("WeatherPresets"), + set_state=lambda s: self._params.put_bool("WeatherPresets", s), + visible=lambda: self._params.get_bool("QOLLongitudinal")), + SettingRow("WeatherNav", "value", tr_noop("Configure Weather Offsets"), + subtitle=tr_noop("Adjust following distance, acceleration, and curve speed for weather conditions."), + get_value=lambda: tr_noop("Configure"), + navigate_to="weather", + visible=lambda: self._params.get_bool("QOLLongitudinal") and self._params.get_bool("WeatherPresets")), ], tab_key="daily", column_pair="daily"), ] diff --git a/starpilot/system/the_pond/assets/components/tools/device_settings_layout.json b/starpilot/system/the_pond/assets/components/tools/device_settings_layout.json index 36155209c..30f8b130d 100644 --- a/starpilot/system/the_pond/assets/components/tools/device_settings_layout.json +++ b/starpilot/system/the_pond/assets/components/tools/device_settings_layout.json @@ -1172,7 +1172,8 @@ "ui_type": "numeric", "min": 0.0, "max": 3.0, - "step": 0.01 + "step": 0.01, + "parent_key": "LowVisibilityOffsets" }, { "key": "IncreasedStoppedDistanceLowVisibility", @@ -1181,7 +1182,8 @@ "data_type": "float", "ui_type": "numeric", "min": 0.0, - "max": 10.0 + "max": 10.0, + "parent_key": "LowVisibilityOffsets" }, { "key": "ReduceAccelerationLowVisibility", @@ -1191,7 +1193,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "LowVisibilityOffsets" }, { "key": "ReduceLateralAccelerationLowVisibility", @@ -1201,7 +1204,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "LowVisibilityOffsets" }, { "key": "RainOffsets", @@ -1219,7 +1223,8 @@ "ui_type": "numeric", "min": 0.0, "max": 3.0, - "step": 0.01 + "step": 0.01, + "parent_key": "RainOffsets" }, { "key": "IncreasedStoppedDistanceRain", @@ -1228,7 +1233,8 @@ "data_type": "float", "ui_type": "numeric", "min": 0.0, - "max": 10.0 + "max": 10.0, + "parent_key": "RainOffsets" }, { "key": "ReduceAccelerationRain", @@ -1238,7 +1244,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "RainOffsets" }, { "key": "ReduceLateralAccelerationRain", @@ -1248,7 +1255,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "RainOffsets" }, { "key": "RainStormOffsets", @@ -1266,7 +1274,8 @@ "ui_type": "numeric", "min": 0.0, "max": 3.0, - "step": 0.01 + "step": 0.01, + "parent_key": "RainStormOffsets" }, { "key": "IncreasedStoppedDistanceRainStorm", @@ -1275,7 +1284,8 @@ "data_type": "float", "ui_type": "numeric", "min": 0.0, - "max": 10.0 + "max": 10.0, + "parent_key": "RainStormOffsets" }, { "key": "ReduceAccelerationRainStorm", @@ -1285,7 +1295,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "RainStormOffsets" }, { "key": "ReduceLateralAccelerationRainStorm", @@ -1295,7 +1306,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "RainStormOffsets" }, { "key": "SnowOffsets", @@ -1313,7 +1325,8 @@ "ui_type": "numeric", "min": 0.0, "max": 3.0, - "step": 0.01 + "step": 0.01, + "parent_key": "SnowOffsets" }, { "key": "IncreasedStoppedDistanceSnow", @@ -1322,7 +1335,8 @@ "data_type": "float", "ui_type": "numeric", "min": 0.0, - "max": 10.0 + "max": 10.0, + "parent_key": "SnowOffsets" }, { "key": "ReduceAccelerationSnow", @@ -1332,7 +1346,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "SnowOffsets" }, { "key": "ReduceLateralAccelerationSnow", @@ -1342,7 +1357,8 @@ "ui_type": "numeric", "min": 0.0, "max": 99.0, - "step": 1.0 + "step": 1.0, + "parent_key": "SnowOffsets" }, { "key": "SpeedLimitController",