mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
AOL: Skip the temporary steering warning while the driver steers
A hard override on the Civic puts the EPS in NO_TORQUE_ALERT_1, which reads as a temporary steering fault. The armed-AOL warning added steerTempUnavailableSilent for it every time, even though the driver was holding the wheel. CarSpecificEvents already stays quiet in that case. Route 00000060: all 23 status-2 windows cleared before the driver let go. The warning still shows if the fault is present while the wheel is free. (cherry picked from commit f9167e2a24007c0822b4eae8870a24100a709325)
This commit is contained in:
@@ -2071,9 +2071,11 @@ class SelfdriveD:
|
||||
not self.events.contains(ET.IMMEDIATE_DISABLE)):
|
||||
self.aol_soft_takeover_alert = True
|
||||
if (self.aol_replay and intent is not None and intent.lateralArmed and
|
||||
CS.steerFaultTemporary and not CS.steerFaultPermanent):
|
||||
CS.steerFaultTemporary and not CS.steerFaultPermanent and not CS.steeringPressed):
|
||||
# An armed AOL session still needs the ordinary temporary-steering warning
|
||||
# while actual steering is suspended and the stock state machine is off.
|
||||
# Like CarSpecificEvents, skip it while the driver is steering: a hard
|
||||
# override alone puts Honda EPS in NO_TORQUE_ALERT_1.
|
||||
if EventName.steerTempUnavailableSilent not in self.events.names:
|
||||
self.events.add(EventName.steerTempUnavailableSilent)
|
||||
if ET.WARNING not in self.state_machine.current_alert_types:
|
||||
|
||||
@@ -1372,6 +1372,16 @@ class IpcAxisContractTests(unittest.TestCase):
|
||||
self.assertEqual(sd.AM.current_alert.alert_type, 'steerTempUnavailableSilent/warning')
|
||||
self.assertEqual(sd.AM.current_alert.alert_status, log.SelfdriveState.AlertStatus.userPrompt)
|
||||
self.assertEqual(sd.AM.current_alert.alert_text_1, 'Steering Assist Temporarily Unavailable')
|
||||
# A hard driver override puts Honda EPS in NO_TORQUE_ALERT_1; the driver
|
||||
# is already steering, so the warning waits until they let go.
|
||||
state.steeringPressed = True
|
||||
sd.sm.frame += 1
|
||||
sd.step()
|
||||
self.assertNotIn(log.OnroadEvent.EventName.steerTempUnavailableSilent, sd.events.names)
|
||||
state.steeringPressed = False
|
||||
sd.sm.frame += 1
|
||||
sd.step()
|
||||
self.assertIn(log.OnroadEvent.EventName.steerTempUnavailableSilent, sd.events.names)
|
||||
state.steerFaultTemporary = False
|
||||
native.requestedLateral = native.lateralAllowed = True
|
||||
sd.sm.frame += 1
|
||||
|
||||
Reference in New Issue
Block a user