diff --git a/panda b/panda index ad4f69cd18..f088af5664 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit ad4f69cd18954e06789c5e404175ff1cf8db7ea0 +Subproject commit f088af5664d99acfdaa2a006bd9ee520e4d61430 diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index e882ef4b64..ae2a188e3f 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -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), diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 0bf43aa887..638b70531a 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -c1a729c087e9f26e40d8f7db5bdfe62d12fb0bc9 \ No newline at end of file +c93e3735143a88f0088eb23e6fde56660d4a53e2 \ No newline at end of file