send inactive signals

pull/28196/head
Cameron Clough 2 years ago
parent e373d76cc3
commit dde883675c
  1. 2
      panda
  2. 14
      selfdrive/car/ford/carcontroller.py

@ -1 +1 @@
Subproject commit 50c275ea012d38043d7f1ad0b8bed3c2b3ba609b
Subproject commit d403ef25b11eaa1ba1c64ca9cc50fa78e6e30bfe

@ -82,12 +82,16 @@ class CarController:
### longitudinal control ###
# send acc msg at 50Hz
if self.CP.openpilotLongitudinalControl and (self.frame % CarControllerParams.ACC_CONTROL_STEP) == 0:
accel = clip(actuators.accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX)
gas = accel
decel = accel < 0.0
if accel < -0.5:
if CC.longActive:
accel = clip(actuators.accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX)
gas = accel
decel = accel < 0.0
if accel < -0.5:
gas = -5.0
else:
accel = 0.0 # -0.0008 m/s^2 on CAN
gas = -5.0
decel = False
stopping = CC.actuators.longControlState == LongCtrlState.stopping
can_sends.append(create_acc_msg(self.packer, CC.longActive, gas, accel, decel, stopping))

Loading…
Cancel
Save