From 5485bfeeb7bbe99d01be605f8b0d392581bfcfdb Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 23 Sep 2024 19:27:30 -0700 Subject: [PATCH] better comment --- opendbc/car/toyota/carcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index 8f1415d5b..2b4708e77 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -158,7 +158,7 @@ def update(self, CC, CS, now_nanos): if pcm_cancel_cmd and self.CP.carFingerprint in UNSUPPORTED_DSU_CAR: can_sends.append(toyotacan.create_acc_cancel_command(self.packer)) elif self.CP.openpilotLongitudinalControl: - # on transition from negative to positive accel, send one frame of zero to ensure gas starts at zero + # internal PCM gas command can get stuck at high negative values. send one frame of zero when transitioning from braking to gas if pcm_accel_cmd > 0 > self.accel and abs(pcm_accel_cmd - self.accel) > 0.5: pcm_accel_cmd = 0