Toyota: PERMIT_BRAKING shouldn't use rate limited decel (#1495)
fix permit braking being set late with step brake response
This commit is contained in:
parent
38c867912a
commit
c10cd4f5ab
|
@ -203,9 +203,10 @@ class CarController(CarControllerBase):
|
|||
|
||||
# Along with rate limiting positive jerk above, 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 or stopping or not CC.longActive:
|
||||
net_acceleration_request_min = min(actuators.accel + accel_due_to_pitch, net_acceleration_request)
|
||||
if net_acceleration_request_min < 0.1 or stopping or not CC.longActive:
|
||||
self.permit_braking = True
|
||||
elif net_acceleration_request > 0.2:
|
||||
elif net_acceleration_request_min > 0.2:
|
||||
self.permit_braking = False
|
||||
|
||||
pcm_accel_cmd = clip(pcm_accel_cmd, self.params.ACCEL_MIN, self.params.ACCEL_MAX)
|
||||
|
|
Loading…
Reference in New Issue