GM: resolve cruise faults (#24167)

* these should be enabled

* bump panda

* bump

* allow in pre-enabled state

* bump panda

* add comment

* bump and update refs

* bump panda

* bump panda
pull/24176/head
Shane Smiskol 3 years ago committed by GitHub
parent 720adbc49f
commit 0f61a388c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 7
      selfdrive/car/gm/carcontroller.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit ad4f69cd18954e06789c5e404175ff1cf8db7ea0
Subproject commit f088af5664d99acfdaa2a006bd9ee520e4d61430

@ -63,7 +63,7 @@ class CarController:
# Gas/regen and brakes - all at 25Hz
if (self.frame % 4) == 0:
if not CC.longActive:
# Stock ECU sends max regen when not enabled.
# Stock ECU sends max regen when not enabled
self.apply_gas = self.params.MAX_ACC_REGEN
self.apply_brake = 0
else:
@ -74,13 +74,14 @@ class CarController:
at_full_stop = CC.longActive and CS.out.standstill
near_stop = CC.longActive and (CS.out.vEgo < self.params.NEAR_STOP_BRAKE_PHASE)
# GasRegenCmdActive needs to be 1 to avoid cruise faults. It describes the ACC state, not actuation
can_sends.append(gmcan.create_gas_regen_command(self.packer_pt, CanBus.POWERTRAIN, self.apply_gas, idx, CC.enabled, at_full_stop))
can_sends.append(gmcan.create_friction_brake_command(self.packer_ch, CanBus.CHASSIS, self.apply_brake, idx, near_stop, at_full_stop))
can_sends.append(gmcan.create_gas_regen_command(self.packer_pt, CanBus.POWERTRAIN, self.apply_gas, idx, CC.longActive, at_full_stop))
# Send dashboard UI commands (ACC status), 25hz
if (self.frame % 4) == 0:
send_fcw = hud_alert == VisualAlert.fcw
can_sends.append(gmcan.create_acc_dashboard_command(self.packer_pt, CanBus.POWERTRAIN, CC.longActive,
can_sends.append(gmcan.create_acc_dashboard_command(self.packer_pt, CanBus.POWERTRAIN, CC.enabled,
hud_v_cruise * CV.MS_TO_KPH, hud_control.leadVisible, send_fcw))
# Radar needs to know current speed and yaw rate (50hz),

@ -1 +1 @@
c1a729c087e9f26e40d8f7db5bdfe62d12fb0bc9
c93e3735143a88f0088eb23e6fde56660d4a53e2
Loading…
Cancel
Save