From a570984aa3791aad77d6b771139381a7c4debd86 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sun, 13 Nov 2022 20:50:28 -0800 Subject: [PATCH] interfaces: disable on falling edge of cancel button (#26493) * both * Update ref_commit old-commit-hash: ca37d0c8cc43a88189c2a96b02aed0edfe5aa32e --- selfdrive/car/interfaces.py | 4 ++-- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 982ba40b17..8e8872a539 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -250,8 +250,8 @@ class CarInterfaceBase(ABC): # Enable OP long on falling edge of enable buttons (defaults to accelCruise and decelCruise, overridable per-port) if not self.CP.pcmCruise and (b.type in enable_buttons and not b.pressed): events.add(EventName.buttonEnable) - # Disable on rising edge of cancel for both stock and OP long - if b.type == ButtonType.cancel and b.pressed: + # Disable on rising and falling edge of cancel for both stock and OP long + if b.type == ButtonType.cancel: events.add(EventName.buttonCancel) # Handle permanent and temporary steering faults diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 2ff423a84a..55788155b5 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -b5c833a8f5b3e6202a52746fc16809c7b649d591 +2ac5ecc79218aad0319e02218b050319a180e957