From 4e3d726cbfe99dd731c0d6cd7be18baf5a36f699 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sat, 10 Aug 2024 11:00:05 -0400 Subject: [PATCH] 2 modes! --- selfdrive/car/hyundai/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 34414df7e3..7db3dd9e41 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -221,8 +221,8 @@ class CarInterface(CarInterfaceBase): self.CS.accEnabled = True if self.enable_mads: - if not self.CS.prev_mads_enabled and self.CS.mads_enabled and \ - (any(b.type == ButtonType.altButton3 for b in self.CS.button_events) and not self.CP.pcmCruise): + if not self.CS.prev_mads_enabled and self.CS.mads_enabled and (self.CP.pcmCruise or + (any(b.type == ButtonType.altButton3 for b in self.CS.button_events) and not self.CP.pcmCruise)): self.CS.madsEnabled = True if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events): self.CS.madsEnabled = not self.CS.madsEnabled