From 0e78fbdab637af21943cefc05e079836f8bd8717 Mon Sep 17 00:00:00 2001 From: lukasloetkolben <61192133+lukasloetkolben@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:16:00 -0700 Subject: [PATCH] use orignal counter --- opendbc/car/tesla/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/tesla/carcontroller.py b/opendbc/car/tesla/carcontroller.py index de02f90209..de57cbecba 100644 --- a/opendbc/car/tesla/carcontroller.py +++ b/opendbc/car/tesla/carcontroller.py @@ -43,7 +43,7 @@ def update(self, CC, CS, now_nanos): if hands_on_fault: state = 13 # "ACC_CANCEL_GENERIC_SILENT" accel = clip(actuators.accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX) - cntr = (self.frame // 4) % 8 + cntr = CS.das_control["DAS_controlCounter"] can_sends.append(self.tesla_can.create_longitudinal_command(state, accel, cntr)) # Increment counter so cancel is prioritized even without openpilot longitudinal