Honda Longitudinal: Display personality in instrument cluster (#31799)

* Honda Longitudinal: Display personality in instrument cluster

* Simpler

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

* cleanup

* Update selfdrive/car/honda/hondacan.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/31462/head
Jason Wen 1 year ago committed by GitHub
parent 7ca07f8be9
commit 5f39a6f8be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      selfdrive/car/honda/carcontroller.py
  2. 2
      selfdrive/car/honda/hondacan.py

@ -96,7 +96,7 @@ def process_hud_alert(hud_alert):
HUDData = namedtuple("HUDData",
["pcm_accel", "v_cruise", "lead_visible",
"lanes_visible", "fcw", "acc_alert", "steer_required"])
"lanes_visible", "fcw", "acc_alert", "steer_required", "lead_distance_bars"])
def rate_limit_steer(new_steer, last_steer):
@ -251,7 +251,7 @@ class CarController(CarControllerBase):
# Send dashboard UI commands.
if self.frame % 10 == 0:
hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), hud_control.leadVisible,
hud_control.lanesVisible, fcw_display, acc_alert, steer_required)
hud_control.lanesVisible, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars)
can_sends.extend(hondacan.create_ui_commands(self.packer, self.CAN, self.CP, CC.enabled, pcm_speed, hud, CS.is_metric, CS.acc_hud, CS.lkas_hud))
if self.CP.openpilotLongitudinalControl and self.CP.carFingerprint not in HONDA_BOSCH:

@ -143,7 +143,7 @@ def create_ui_commands(packer, CAN, CP, enabled, pcm_speed, hud, is_metric, acc_
acc_hud_values = {
'CRUISE_SPEED': hud.v_cruise,
'ENABLE_MINI_CAR': 1 if enabled else 0,
'HUD_DISTANCE': 0, # max distance setting on display
'HUD_DISTANCE': (hud.lead_distance_bars + 1) % 4, # wraps to 0 at 4 bars
'IMPERIAL_UNIT': int(not is_metric),
'HUD_LEAD': 2 if enabled and hud.lead_visible else 1 if enabled else 0,
'SET_ME_X01_2': 1,

Loading…
Cancel
Save