fix keyword

pull/26463/head
Shane Smiskol 3 years ago
parent 53855f7fed
commit 08d0cbb1a8
  1. 4
      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], 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 = [] events = []
# Initialized to unpressed, don't add any 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 return events
# Add events for button presses, handling when a button switches without going to unpressed # Add events for button presses, handling when a button switches without going to unpressed

Loading…
Cancel
Save