minsteerspeed

This commit is contained in:
firestar5683
2026-03-25 14:06:05 -05:00
parent 00b8eb2b20
commit 3e31394aaa
2 changed files with 9 additions and 8 deletions
+7 -6
View File
@@ -130,12 +130,13 @@ class CarSpecificEvents:
events = self.create_common_events(CS, CS_prev, extra_gears=extra_gears, pcm_enable=self.CP.pcmCruise,
suppress_low_speed_alert=True)
# StarPilot behavior: show the low-speed steer alert once per ignition cycle.
if (not CS.cruiseState.available and not CS_prev.cruiseState.available and
CS.vEgo < 0.1 and not CC.enabled):
self.gm_low_speed_alert_shown = False
if CS.lowSpeedAlert and not self.gm_low_speed_alert_shown:
# Show the low-speed steer alert once per drive when speed dips below min steer speed.
crossed_below_min_steer_speed = (
self.CP.minSteerSpeed > 0. and
CS_prev.vEgo >= self.CP.minSteerSpeed and
CS.vEgo < self.CP.minSteerSpeed
)
if CS.lowSpeedAlert and crossed_below_min_steer_speed and not self.gm_low_speed_alert_shown:
events.add(EventName.belowSteerSpeed)
self.gm_low_speed_alert_shown = True
+2 -2
View File
@@ -262,10 +262,10 @@ def below_engage_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.
def below_steer_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality, frogpilot_toggles: SimpleNamespace) -> Alert:
return Alert(
f"Steer Assist Unavailable Below {get_display_speed(CP.minSteerSpeed, metric)}",
f"Steer Unavailable Under {get_display_speed(CP.minSteerSpeed, metric)}",
"",
AlertStatus.userPrompt, AlertSize.small,
Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 0.4)
Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 1.5)
def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality, frogpilot_toggles: SimpleNamespace) -> Alert: