Skip to content

Commit

Permalink
GM Longitudinal: Display personality in instrument cluster (#31801)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
sunnyhaibin and sshane authored Mar 11, 2024
1 parent 1db30ea commit 3d7595d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/gm/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def update(self, CC, CS, now_nanos):
# 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)
Expand Down
6 changes: 3 additions & 3 deletions selfdrive/car/gm/gmcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
653f68e6be4689dc9dce1a93cb726d37b9c588d3
fba62008efd13fb578de325f0cdb0a87fe5e28f0

0 comments on commit 3d7595d

Please sign in to comment.