GM Longitudinal: Display personality in instrument cluster (#31801)

* GM Longitudinal: Display personality in instrument cluster

* Correct value

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3d7595dfe3
pull/32199/head
Jason Wen 1 year ago committed by GitHub
parent f2533f20cd
commit 583c80a417
  1. 2
      selfdrive/car/gm/carcontroller.py
  2. 6
      selfdrive/car/gm/gmcan.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -118,7 +118,7 @@ class CarController(CarControllerBase):
# Send dashboard UI commands (ACC status)
send_fcw = hud_alert == VisualAlert.fcw
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))
hud_v_cruise * CV.MS_TO_KPH, hud_control, send_fcw))
# Radar needs to know current speed and yaw rate (50hz),
# and that ADAS is alive (10hz)

@ -102,17 +102,17 @@ def create_friction_brake_command(packer, bus, apply_brake, idx, enabled, near_s
return packer.make_can_msg("EBCMFrictionBrakeCmd", bus, values)
def create_acc_dashboard_command(packer, bus, enabled, target_speed_kph, lead_car_in_sight, fcw):
def create_acc_dashboard_command(packer, bus, enabled, target_speed_kph, hud_control, fcw):
target_speed = min(target_speed_kph, 255)
values = {
"ACCAlwaysOne": 1,
"ACCResumeButton": 0,
"ACCSpeedSetpoint": target_speed,
"ACCGapLevel": 3 * enabled, # 3 "far", 0 "inactive"
"ACCGapLevel": hud_control.leadDistanceBars * enabled, # 3 "far", 0 "inactive"
"ACCCmdActive": enabled,
"ACCAlwaysOne2": 1,
"ACCLeadCar": lead_car_in_sight,
"ACCLeadCar": hud_control.leadVisible,
"FCWAlert": 0x3 if fcw else 0
}

@ -1 +1 @@
653f68e6be4689dc9dce1a93cb726d37b9c588d3
fba62008efd13fb578de325f0cdb0a87fe5e28f0
Loading…
Cancel
Save