From d5d1b47c32d0e37331ce679c2a46c335c61e2cf0 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 6 Nov 2026 21:18:55 -0600 Subject: [PATCH] Qualify split HKG angle EPS publications --- .../aol/tests/test_hkg_angle_eps_retention.py | 15 ++++++++++----- openpilot/starpilot/aol/transport_pause.py | 8 ++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/openpilot/starpilot/aol/tests/test_hkg_angle_eps_retention.py b/openpilot/starpilot/aol/tests/test_hkg_angle_eps_retention.py index 85fa2ef605..81db181cb7 100644 --- a/openpilot/starpilot/aol/tests/test_hkg_angle_eps_retention.py +++ b/openpilot/starpilot/aol/tests/test_hkg_angle_eps_retention.py @@ -209,10 +209,15 @@ def test_stopped_full_request_keeps_existing_lateral_intent_without_granting_com if tick == 4: assert axis.desiredLongitudinal and not axis.longitudinalActive assert not axis.lateralActive and not command.latActive and not command.longActive - stopped_role = feedback._angle_stop_intent_current(sm, sd.CP, state, axis, int(sm.logMonoTime['aolAxisState']), now, - latched=True, producer='authority-card') - before = {'feedback': repr(vars(feedback)), 'state': state.to_dict(), 'native': repr(sd.sm['aolSafetyWire']), 'pandas': repr(sd.sm['pandaStates']), 'tick': tick, 'stopped_role': stopped_role, 'pending_event': feedback.pending_event, - 'axis': axis.to_dict(), 'events': [str(e.name) for e in sm['onroadEvents']]} + if tick == 5: + assert axis.longitudinalActive and not axis.lateralActive and not command.latActive + assert all(not p.controlsAllowed for p in sm['pandaStates']) + veto = messaging.SubMaster(['aolAxisState', 'onroadEvents', 'aolSafetyWire', 'pandaStates']) + latest = messaging.new_message('pandaStates', len(sm['pandaStates']), valid=True, logMonoTime=now) + latest.pandaStates = sm['pandaStates'] + veto.update_msgs(now / 1e9, [*frames[:3], latest.as_reader()]) + assert not feedback._angle_stop_intent_current(veto, sd.CP, state, axis, now, now, + latched=True, producer='authority-card') assert not feedback.observe(sm, sd.CP, state, now, latched=True, - intent_producer_session='authority-card'), 'STOPPED_FULL_REQUEST_DISARMED ' + repr(before) + intent_producer_session='authority-card'), f'STOPPED_FULL_REQUEST_DISARMED tick={tick}' assert not feedback.failed diff --git a/openpilot/starpilot/aol/transport_pause.py b/openpilot/starpilot/aol/transport_pause.py index 6539abafa4..be92dd56df 100644 --- a/openpilot/starpilot/aol/transport_pause.py +++ b/openpilot/starpilot/aol/transport_pause.py @@ -1201,6 +1201,14 @@ class TransportPauseFeedback: return False native = _configured_transport_native(sm, cp, self.session, now_ns, require_longitudinal=not pending_stop, allow_restricted_lateral=True) + if native is None and combined_stop: + newer = _configured_transport_native(sm, cp, self.session, now_ns, + require_longitudinal=False, allow_restricted_lateral=True) + if (newer is not None and newer.pandaInventory and + 0 < int(sm.logMonoTime['pandaStates']) < newer.sourcePandaStatesMonoTime and + all(slot.controlsAllowed for slot, config in zip(newer.pandaInventory, cp.safetyConfigs, strict=True) + if str(config.safetyModel) not in ('silent', 'noOutput'))): + native = newer return bool(native is not None and native.pandaInventory and native.requestedLateral and (not native.lateralAllowed or subaru_stop and not axis.desiredLateral and not axis.lateralActive) and (pending_stop or not native.requestedLongitudinal and not combined_stop or