diff --git a/openpilot/selfdrive/selfdrived/selfdrived.py b/openpilot/selfdrive/selfdrived/selfdrived.py index e569149579..59538c7fe2 100644 --- a/openpilot/selfdrive/selfdrived/selfdrived.py +++ b/openpilot/selfdrive/selfdrived/selfdrived.py @@ -2135,7 +2135,7 @@ class SelfdriveD: if ET.WARNING not in self.state_machine.current_alert_types: self.state_machine.current_alert_types.append(ET.WARNING) if (getattr(self, 'aol_fault_reason', 'none') == 'availabilityPause' and - (self.CP.brand != 'ford' or self.enabled or intent is not None and intent.allowedLatch) and + (self.enabled or intent is not None and intent.allowedLatch) and ET.WARNING not in self.state_machine.current_alert_types): self.state_machine.current_alert_types.append(ET.WARNING) axis_published = bool(not REPLAY and self.aol_replay and self.axis_transport_required) diff --git a/openpilot/starpilot/aol/tests/test_unarmed_temporary_steering.py b/openpilot/starpilot/aol/tests/test_unarmed_temporary_steering.py new file mode 100644 index 0000000000..861d2ef01c --- /dev/null +++ b/openpilot/starpilot/aol/tests/test_unarmed_temporary_steering.py @@ -0,0 +1,37 @@ +from contextlib import ExitStack + +import pytest + +from openpilot.cereal import log +from openpilot.common.prefix import OpenpilotPrefix +from openpilot.starpilot.aol.tests import test_ioniq_availability as fixture +from opendbc.car import structs +from opendbc.car.hyundai.values import CAR + + +@pytest.mark.parametrize('profile', [False, CAR.HYUNDAI_IONIQ_5_PE, CAR.KIA_EV9], ids=['ioniq6', 'ioniq5pe', 'ev9']) +def test_unarmed_parked_temporary_eps_keeps_fault_without_warning(profile): + case = fixture.IoniqAvailabilityTests(methodName='runTest') + with ExitStack() as cleanup: + cleanup.callback(case.doCleanups) + cleanup.enter_context(OpenpilotPrefix()) + sd, _, step, _, _ = case._ioniq_availability_callers(full_op=False, initially_armed=False, stock_angle=profile) + parked = fixture.car_state() + parked.gearShifter = structs.CarState.GearShifter.park + parked.vEgo = parked.vEgoRaw = 0. + parked.standstill = parked.steerFaultTemporary = True + for tick in range(2, 32): + axis, state, command = step(tick, observed_state=parked, native_request_lat=False, + native_request_long=False, allowed=False) + assert sd.CS_prev.steerFaultTemporary + assert log.OnroadEvent.EventName.steerTempUnavailableSilent in sd.events.names + assert not axis.lateralActive and not axis.longitudinalActive + assert not command.latActive and not command.longActive and not command.enabled + assert state.alertType != 'steerTempUnavailableSilent/warning', 'UNARMED_PARKED_EPS_WARNING' + parked.steerFaultTemporary = False + for tick in range(32, 45): + _, state, command = step(tick, observed_state=parked, native_request_lat=False, + native_request_long=False, allowed=False) + assert log.OnroadEvent.EventName.steerTempUnavailableSilent not in sd.events.names + assert not command.latActive and not command.longActive + assert state.alertType != 'steerTempUnavailableSilent/warning' diff --git a/prebuilt.json b/prebuilt.json index dc26704542..5eb47d42ad 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "c3e01d80eff2b69cad37bab0e35e0ee5cef040205d73aae08752c4838b04a9ae", "schema_version": 1} +{"protected_inventory_sha256": "49f8fb7f0c1b26ca19559566538c2c94d1c5e270d8163e5e2356de0a4621cea3", "schema_version": 1}