diff --git a/selfdrive/car/chrysler/interface.py b/selfdrive/car/chrysler/interface.py index 219f0244a4..d8bbb62b38 100755 --- a/selfdrive/car/chrysler/interface.py +++ b/selfdrive/car/chrysler/interface.py @@ -113,7 +113,7 @@ class CarInterface(CarInterfaceBase): self.CS.accEnabled = False self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # CANCEL if self.CS.out.cruiseState.enabled and not ret.cruiseState.enabled: diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 668ba37d19..4d73cf2487 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -243,7 +243,7 @@ class CarInterface(CarInterfaceBase): self.CS.accEnabled = False self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # MADS BUTTON if self.CS.out.madsEnabled != self.CS.madsEnabled: diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 0c7d6238fa..410aa86fb9 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -344,7 +344,7 @@ class CarInterface(CarInterfaceBase): self.CS.accEnabled = False self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) ret.buttonEvents = buttonEvents diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 8034be0f86..ece2e6dcbf 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -335,7 +335,7 @@ class CarInterface(CarInterfaceBase): if self.get_sp_pedal_disengage(ret.brakePressed, ret.standstill): self.CS.madsEnabled = False if not self.enable_mads else self.CS.madsEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # MADS BUTTON if self.CS.out.madsEnabled != self.CS.madsEnabled: diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 6c1e99c401..654e1f6e15 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -363,12 +363,11 @@ class CarInterfaceBase(ABC): def get_sp_pedal_disengage(self, brake_pressed, standstill): return brake_pressed and (not self.CS.out.brakePressed or not standstill) - def get_sp_common_state(self, cs_out, CS, controls_cancel, gear_allowed=True): + def get_sp_common_state(self, cs_out, CS, gear_allowed=True): if self.CP.pcmCruise: if not cs_out.cruiseState.enabled and CS.out.cruiseState.enabled: CS.madsEnabled, cs_out.cruiseState.enabled = self.get_sp_cancel_cruise_state(CS.madsEnabled) - CS.accEnabled = False if controls_cancel else CS.accEnabled cs_out.cruiseState.enabled = cs_out.cruiseState.enabled if self.CP.pcmCruise else CS.accEnabled if not self.enable_mads: if cs_out.cruiseState.enabled and not CS.out.cruiseState.enabled: diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index f4e63c0a32..0737e68dbe 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -83,7 +83,7 @@ class CarInterface(CarInterfaceBase): self.get_sp_pedal_disengage(ret.brakePressed, ret.standstill): self.CS.madsEnabled = False if not self.enable_mads else self.CS.madsEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # MADS BUTTON if self.CS.out.madsEnabled != self.CS.madsEnabled: diff --git a/selfdrive/car/nissan/interface.py b/selfdrive/car/nissan/interface.py index b67d1e2b4a..5b3e27731d 100644 --- a/selfdrive/car/nissan/interface.py +++ b/selfdrive/car/nissan/interface.py @@ -64,7 +64,7 @@ class CarInterface(CarInterfaceBase): self.get_sp_pedal_disengage(ret.brakePressed, ret.standstill): self.CS.madsEnabled = False if not self.enable_mads else self.CS.madsEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # CANCEL if self.CS.out.cruiseState.enabled and not ret.cruiseState.enabled: diff --git a/selfdrive/car/subaru/interface.py b/selfdrive/car/subaru/interface.py index 22f00e242a..15f041afbc 100644 --- a/selfdrive/car/subaru/interface.py +++ b/selfdrive/car/subaru/interface.py @@ -136,7 +136,7 @@ class CarInterface(CarInterfaceBase): if self.get_sp_pedal_disengage(ret.brakePressed, ret.standstill): self.CS.madsEnabled = False if not self.enable_mads else self.CS.madsEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # CANCEL if self.CS.out.cruiseState.enabled and not ret.cruiseState.enabled: diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 29a38ca07a..c4a53e6eab 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -266,7 +266,7 @@ class CarInterface(CarInterfaceBase): self.get_sp_pedal_disengage(ret.brakePressed, ret.standstill): self.CS.madsEnabled = False if not self.enable_mads else self.CS.madsEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # CANCEL if self.CS.out.cruiseState.enabled and not ret.cruiseState.enabled: diff --git a/selfdrive/car/volkswagen/interface.py b/selfdrive/car/volkswagen/interface.py index 072adc1986..e497fae84f 100644 --- a/selfdrive/car/volkswagen/interface.py +++ b/selfdrive/car/volkswagen/interface.py @@ -234,7 +234,7 @@ class CarInterface(CarInterfaceBase): self.CS.accEnabled = False self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled - ret, self.CS = self.get_sp_common_state(ret, self.CS, c.cruiseControl.cancel) + ret, self.CS = self.get_sp_common_state(ret, self.CS) # MADS BUTTON if self.CS.out.madsEnabled != self.CS.madsEnabled: