this is better

This commit is contained in:
Jason Wen
2024-07-20 21:15:37 -04:00
parent f6066f4076
commit d51d95426a
+3 -2
View File
@@ -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):