restore lead car visible for PQ

mqb-long
Jason Young 3 years ago
parent e91143a590
commit d5fe666e56
  1. 3
      selfdrive/car/volkswagen/carcontroller.py
  2. 2
      selfdrive/car/volkswagen/mqbcan.py
  3. 5
      selfdrive/car/volkswagen/pqcan.py

@ -89,7 +89,8 @@ class CarController:
if self.frame % self.CCP.ACC_HUD_STEP == 0 and self.CP.openpilotLongitudinalControl:
acc_hud_status = self.CCS.acc_hud_status_value(CS.out.cruiseState.available, CS.out.accFaulted, CC.longActive)
set_speed = hud_control.setSpeed * CV.MS_TO_KPH # FIXME: follow the recent displayed-speed updates, also use mph_kmh toggle to fix display rounding problem?
can_sends.append(self.CCS.create_acc_hud_control(self.packer_pt, CANBUS.pt, acc_hud_status, set_speed))
can_sends.append(self.CCS.create_acc_hud_control(self.packer_pt, CANBUS.pt, acc_hud_status, set_speed,
hud_control.leadVisible))
# **** Stock ACC Button Controls **************************************** #

@ -96,7 +96,7 @@ def create_acc_accel_control(packer, bus, acc_type, enabled, accel, acc_control,
return commands
def create_acc_hud_control(packer, bus, acc_hud_status, set_speed):
def create_acc_hud_control(packer, bus, acc_hud_status, set_speed, lead_visible):
values = {
"ACC_Status_Anzeige": acc_hud_status,
"ACC_Wunschgeschw": set_speed if set_speed < 250 else 327.36,

@ -76,12 +76,13 @@ def create_acc_accel_control(packer, bus, acc_type, enabled, accel, acc_control,
return commands
def create_acc_hud_control(packer, bus, acc_hud_status, set_speed):
def create_acc_hud_control(packer, bus, acc_hud_status, set_speed, lead_visible):
values = {
"ACA_StaACC": acc_hud_status,
"ACA_Zeitluecke": 2,
"ACA_V_Wunsch": set_speed,
# TODO: ACA_gemZeitl, ACA_ID_StaACC, ACA_AnzDisplay, ACA_kmh_mph, ACA_PrioDisp, ACA_Aend_Zeitluecke
"ACA_gemZeitl": 8 if lead_visible else 0,
# TODO: ACA_ID_StaACC, ACA_AnzDisplay, ACA_kmh_mph, ACA_PrioDisp, ACA_Aend_Zeitluecke
# display/display-prio handling probably needed to stop confusing the instrument cluster
# kmh_mph handling probably needed to resolve rounding errors in displayed setpoint
}

Loading…
Cancel
Save