GM: match stock enabling behavior (#26442)

* add first draft enable button timeout

* use allow_enable

* it doesn't count if brakePressed

* enable on rising edge of resume (matches stock)

* not today

* add comment describing the fault this avoids

* cleaner

* handle incrementing speed

* rename

* add test for not changing speed if enabled changes mid-press

* spacey

* ugh

* bumpo

* need this to fix a fault (draft)

* already have

* this should be cancel

* fine to do for all

* fine to do for all

* bump

* bumpo

* bump to master

* Update selfdrive/car/gm/interface.py

* Update selfdrive/car/gm/interface.py

* Update ref_commit
old-commit-hash: 15383d3016
taco
Shane Smiskol 2 years ago committed by GitHub
parent a570984aa3
commit 74d58ab0d6
  1. 2
      panda
  2. 6
      selfdrive/car/gm/interface.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit 0096d0c4fc50d199ca46c6fe40479e1547408aed Subproject commit c0632cd32b78279dfbb3ce28c7a10ded8090d40f

@ -218,9 +218,13 @@ class CarInterface(CarInterfaceBase):
ret.buttonEvents = buttonEvents ret.buttonEvents = buttonEvents
# The ECM allows enabling on falling edge of set, but only rising edge of resume
events = self.create_common_events(ret, extra_gears=[GearShifter.sport, GearShifter.low, events = self.create_common_events(ret, extra_gears=[GearShifter.sport, GearShifter.low,
GearShifter.eco, GearShifter.manumatic], GearShifter.eco, GearShifter.manumatic],
pcm_enable=self.CP.pcmCruise) pcm_enable=self.CP.pcmCruise, enable_buttons=(ButtonType.decelCruise,))
if not self.CP.pcmCruise:
if any(b.type == ButtonType.accelCruise and b.pressed for b in ret.buttonEvents):
events.add(EventName.buttonEnable)
# Enabling at a standstill with brake is allowed # Enabling at a standstill with brake is allowed
# TODO: verify 17 Volt can enable for the first time at a stop and allow for all GMs # TODO: verify 17 Volt can enable for the first time at a stop and allow for all GMs

@ -1 +1 @@
2ac5ecc79218aad0319e02218b050319a180e957 aa2d370836588fd80b648dbed8d156765ec804d5

Loading…
Cancel
Save