diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index ebbf701811..ac2cb2f25d 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -166,9 +166,9 @@ def update(self, CC, CS, now_nanos): # Along with rate limiting positive jerk below, this greatly improves gas response time # Consider the net acceleration request that the PCM should be applying (pitch included) - if net_acceleration_request < 0.1: + if pcm_accel_cmd + accel_due_to_pitch < 0.1: self.permit_braking = True - elif net_acceleration_request > 0.2: + elif pcm_accel_cmd + accel_due_to_pitch > 0.2: self.permit_braking = False else: self.pcm_accel_compensation = 0.0