From 54e2d7d190bf9a1e336525dd5a13987f29d7639a Mon Sep 17 00:00:00 2001 From: Lukas <61192133+lukasloetkolben@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:32:02 +0100 Subject: [PATCH] Tesla: add missing parameter (#1445) add missing parameter --- opendbc/car/tesla/carcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/tesla/carcontroller.py b/opendbc/car/tesla/carcontroller.py index 4bcc1a99..a0396f48 100644 --- a/opendbc/car/tesla/carcontroller.py +++ b/opendbc/car/tesla/carcontroller.py @@ -43,13 +43,13 @@ class CarController(CarControllerBase): if self.CP.openpilotLongitudinalControl and self.frame % 4 == 0: state = 4 if not hands_on_fault else 13 # 4=ACC_ON, 13=ACC_CANCEL_GENERIC_SILENT accel = clip(actuators.accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX) - cntr = (self.frame // 4) % 8 + cntr = (self.frame // 4) % 8 can_sends.append(self.tesla_can.create_longitudinal_command(state, accel, cntr, CC.longActive)) # Increment counter so cancel is prioritized even without openpilot longitudinal if hands_on_fault and not self.CP.openpilotLongitudinalControl: cntr = (CS.das_control["DAS_controlCounter"] + 1) % 8 - can_sends.append(self.tesla_can.create_longitudinal_command(13, 0, cntr)) + can_sends.append(self.tesla_can.create_longitudinal_command(13, 0, cntr, False)) # TODO: HUD control new_actuators = actuators.as_builder()