mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-15 00:03:45 +08:00
this is better
This commit is contained in:
@@ -220,8 +220,6 @@ class CarInterface(CarInterfaceBase):
|
||||
elif self.CS.prev_cruise_buttons == 4:
|
||||
if self.CS.cruise_buttons[-1] != 4:
|
||||
self.accEnabled = True
|
||||
else:
|
||||
self.CS.madsEnabled = False
|
||||
|
||||
if self.enable_mads:
|
||||
if not self.CS.prev_mads_enabled and self.CS.mads_enabled:
|
||||
@@ -230,6 +228,9 @@ class CarInterface(CarInterfaceBase):
|
||||
self.CS.madsEnabled = not self.CS.madsEnabled
|
||||
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
|
||||
|
||||
if not ret.cruiseState.available and self.CS.out.cruiseState.available:
|
||||
self.CS.madsEnabled = False
|
||||
|
||||
if not self.CP.pcmCruise or not self.CP.pcmCruiseSpeed:
|
||||
if not self.CP.pcmCruise:
|
||||
if any(b.type == ButtonType.cancel for b in buttonEvents):
|
||||
|
||||
Reference in New Issue
Block a user