parent
40951c19ee
commit
423de1223b
|
@ -178,6 +178,7 @@ class CarController(CarControllerBase):
|
|||
pcm_accel_cmd = actuators.accel
|
||||
if CC.longActive:
|
||||
pcm_accel_cmd = rate_limit(pcm_accel_cmd, self.prev_accel, ACCEL_WINDDOWN_LIMIT, ACCEL_WINDUP_LIMIT)
|
||||
self.prev_accel = pcm_accel_cmd
|
||||
|
||||
# calculate amount of acceleration PCM should apply to reach target, given pitch
|
||||
accel_due_to_pitch = math.sin(CC.orientationNED[1]) * ACCELERATION_DUE_TO_GRAVITY if len(CC.orientationNED) == 3 else 0.0
|
||||
|
@ -212,7 +213,6 @@ class CarController(CarControllerBase):
|
|||
can_sends.append(toyotacan.create_accel_command(self.packer, pcm_accel_cmd, pcm_cancel_cmd, self.permit_braking, self.standstill_req, lead,
|
||||
CS.acc_type, fcw_alert, self.distance_button))
|
||||
self.accel = pcm_accel_cmd
|
||||
self.prev_accel = actuators.accel
|
||||
|
||||
else:
|
||||
# we can spam can to cancel the system even if we are using lat only control
|
||||
|
|
Loading…
Reference in New Issue