Merge remote-tracking branch 'upstream/master' into isotp-parallel-response-pending

pull/24724/head
Shane Smiskol 3 years ago
commit 0b32ce260a
  1. 7
      selfdrive/car/__init__.py
  2. 3
      selfdrive/car/car_helpers.py
  3. 2
      selfdrive/car/honda/interface.py

@ -24,12 +24,13 @@ def create_button_event(cur_but: int, prev_but: int, buttons_dict: Dict[int, cap
return be
def create_button_enable_events(buttonEvents: capnp.lib.capnp._DynamicListBuilder) -> List[int]:
def create_button_enable_events(buttonEvents: capnp.lib.capnp._DynamicListBuilder, pcm_cruise: bool = False) -> List[int]:
events = []
for b in buttonEvents:
# do enable on both accel and decel buttons
if b.type in (ButtonType.accelCruise, ButtonType.decelCruise) and not b.pressed:
events.append(EventName.buttonEnable)
if not pcm_cruise:
if b.type in (ButtonType.accelCruise, ButtonType.decelCruise) and not b.pressed:
events.append(EventName.buttonEnable)
# do disable on button down
if b.type == ButtonType.cancel and b.pressed:
events.append(EventName.buttonCancel)

@ -116,6 +116,9 @@ def fingerprint(logcan, sendcan):
vin = VIN_UNKNOWN
exact_fw_match, fw_candidates, car_fw = True, set(), []
if len(vin) != 17:
cloudlog.event("Malformed VIN", vin=vin, error=True)
vin = VIN_UNKNOWN
cloudlog.warning("VIN %s", vin)
Params().put("CarVin", vin)

@ -367,7 +367,7 @@ class CarInterface(CarInterfaceBase):
events.add(EventName.manualRestart)
# handle button presses
events.events.extend(create_button_enable_events(ret.buttonEvents))
events.events.extend(create_button_enable_events(ret.buttonEvents, self.CP.pcmCruise))
ret.events = events.to_msg()

Loading…
Cancel
Save