diff --git a/opendbc_repo b/opendbc_repo index d3cdde5f19d87a..a09b2381aafdc5 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit d3cdde5f19d87a2853874b3fa1c5c5e277d9d7f8 +Subproject commit a09b2381aafdc575e82d5321d13f93002938abe1 diff --git a/selfdrive/car/tesla/interface.py b/selfdrive/car/tesla/interface.py index c1e400734abd1c..365b646e40b09a 100755 --- a/selfdrive/car/tesla/interface.py +++ b/selfdrive/car/tesla/interface.py @@ -13,7 +13,6 @@ class CarInterface(CarInterfaceBase): def __init__(self, CP, CarController, CarState): super().__init__(CP, CarController, CarState) - self.last_mads_press = -1 @staticmethod def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs): @@ -50,14 +49,7 @@ def _update(self, c): if self.enable_mads: for b in self.CS.button_events: if b.type == ButtonType.altButton2 and not b.pressed: - # MADS button (right scroll wheel click) is used for voice command - # So we use double-click to toggle MADS - now = time.monotonic() - if now - self.last_mads_press < 1.0: - self.CS.madsEnabled = not self.CS.madsEnabled - self.last_mads_press = -1 - else: - self.last_mads_press = now + self.CS.madsEnabled = not self.CS.madsEnabled self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled) self.CS.madsEnabled = False if self.CS.steering_override else self.CS.madsEnabled diff --git a/selfdrive/car/tesla/values.py b/selfdrive/car/tesla/values.py index 3e9aab1bc50484..565318a8f22b16 100644 --- a/selfdrive/car/tesla/values.py +++ b/selfdrive/car/tesla/values.py @@ -66,7 +66,7 @@ class CANBUS: Button(car.CarState.ButtonEvent.Type.decelCruise, "VCLEFT_switchStatus", "VCLEFT_swcRightScrollTicks", list(range(-9, 0)), None), Button(car.CarState.ButtonEvent.Type.cancel, "SCCM_rightStalk", "SCCM_rightStalkStatus", [1, 2], None), Button(car.CarState.ButtonEvent.Type.resumeCruise, "SCCM_rightStalk", "SCCM_rightStalkStatus", [3, 4], None), - Button(car.CarState.ButtonEvent.Type.altButton2, "VCLEFT_switchStatus", "VCLEFT_swcRightPressed", [2], 1), # Note that mux needs to be handled in carState + Button(car.CarState.ButtonEvent.Type.altButton2, "VCLEFT_switchStatus", "VCLEFT_swcRightDoublePress", [1], 1), # Note that mux needs to be handled in carState Button(car.CarState.ButtonEvent.Type.gapAdjustCruise, "VCLEFT_switchStatus", "VCLEFT_swcRightTiltRight", [2], 1), # TODO: directional gap adjustment ]