mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-08 19:25:42 +08:00
MADS: Toyota: handle pedal disengage (#244)
This commit is contained in:
@@ -338,6 +338,11 @@ class CarInterface(CarInterfaceBase):
|
||||
else:
|
||||
self.CS.madsEnabled = False
|
||||
|
||||
if self.get_sp_pedal_disengage(ret):
|
||||
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
|
||||
if not self.CP.pcmCruise:
|
||||
ret.cruiseState.enabled = self.CS.accEnabled
|
||||
|
||||
ret, self.CS = self.get_sp_common_state(ret, self.CS, gap_button=bool(self.CS.gap_dist_button))
|
||||
|
||||
# CANCEL
|
||||
|
||||
Reference in New Issue
Block a user