From 08d0cbb1a87c51c3c7718b94dca2b7606b9f852c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 11 Nov 2022 12:34:03 -0800 Subject: [PATCH] fix keyword --- selfdrive/car/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index 51c99e3040..47e18d9e67 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -22,11 +22,11 @@ def apply_hysteresis(val: float, val_steady: float, hyst_gap: float) -> float: def create_button_events(cur_btn: int, prev_btn: int, buttons_dict: Dict[int, capnp.lib.capnp._EnumModule], - unpressed_btn: int = 0, init: Optional[int] = None) -> List[capnp.lib.capnp._DynamicStructBuilder]: + unpressed_btn: int = 0, init_btn: Optional[int] = None) -> List[capnp.lib.capnp._DynamicStructBuilder]: events = [] # Initialized to unpressed, don't add any events - if cur_btn == unpressed_btn and prev_btn == init: + if cur_btn == unpressed_btn and prev_btn == init_btn: return events # Add events for button presses, handling when a button switches without going to unpressed