Merge remote-tracking branch 'upstream/master' into toyota-refactor-cc

pull/28732/head
Shane Smiskol 2 years ago
commit 9da924c4bc
  1. 2
      cereal
  2. 2
      panda
  3. 4
      selfdrive/boardd/boardd.cc
  4. 3
      selfdrive/car/ford/carcontroller.py
  5. 8
      selfdrive/car/ford/fordcan.py
  6. 6
      selfdrive/car/toyota/toyotacan.py

@ -1 +1 @@
Subproject commit f1463a08eebd98725724cb21c5966ea7b23da8b8 Subproject commit f86de2b1a36276e2c5a3ada4a1e8f0fe3e7e5ff2

@ -1 +1 @@
Subproject commit b2cf1976796dbd9f700a76543466c8c9c9665827 Subproject commit a35e9a1edb1e685f00f4dd9d874043f56ea771fc

@ -419,6 +419,10 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *>
cs[j].setCanfdEnabled(can_health.canfd_enabled); cs[j].setCanfdEnabled(can_health.canfd_enabled);
cs[j].setBrsEnabled(can_health.brs_enabled); cs[j].setBrsEnabled(can_health.brs_enabled);
cs[j].setCanfdNonIso(can_health.canfd_non_iso); cs[j].setCanfdNonIso(can_health.canfd_non_iso);
cs[j].setIrq0CallRate(can_health.irq0_call_rate);
cs[j].setIrq1CallRate(can_health.irq1_call_rate);
cs[j].setIrq2CallRate(can_health.irq2_call_rate);
cs[j].setCanCoreResetCnt(can_health.can_core_reset_cnt);
} }
// Convert faults bitset to capnp list // Convert faults bitset to capnp list

@ -43,6 +43,7 @@ class CarController:
main_on = CS.out.cruiseState.available main_on = CS.out.cruiseState.available
steer_alert = hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw) steer_alert = hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw)
fcw_alert = hud_control.visualAlert == VisualAlert.fcw
### acc buttons ### ### acc buttons ###
if CC.cruiseControl.cancel: if CC.cruiseControl.cancel:
@ -100,7 +101,7 @@ class CarController:
# send acc ui msg at 5Hz or if ui state changes # send acc ui msg at 5Hz or if ui state changes
if (self.frame % CarControllerParams.ACC_UI_STEP) == 0 or send_ui: if (self.frame % CarControllerParams.ACC_UI_STEP) == 0 or send_ui:
can_sends.append(create_acc_ui_msg(self.packer, self.CAN, self.CP, main_on, CC.latActive, can_sends.append(create_acc_ui_msg(self.packer, self.CAN, self.CP, main_on, CC.latActive,
CS.out.cruiseState.standstill, hud_control, fcw_alert, CS.out.cruiseState.standstill, hud_control,
CS.acc_tja_status_stock_values)) CS.acc_tja_status_stock_values))
self.main_on_last = main_on self.main_on_last = main_on

@ -142,8 +142,8 @@ def create_acc_msg(packer, CAN: CanBus, long_active: bool, gas: float, accel: fl
return packer.make_can_msg("ACCDATA", CAN.main, values) return packer.make_can_msg("ACCDATA", CAN.main, values)
def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, standstill: bool, hud_control, def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, fcw_alert: bool, standstill: bool,
stock_values: dict): hud_control, stock_values: dict):
""" """
Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam
assist status. assist status.
@ -214,6 +214,10 @@ def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, sta
"AccTGap_D_Dsply": 4, # Fixed time gap in UI "AccTGap_D_Dsply": 4, # Fixed time gap in UI
}) })
# Forwards FCW alert from IPMA
if fcw_alert:
values["FcwVisblWarn_B_Rq"] = 1 # FCW visible alert
return packer.make_can_msg("ACCDATA_3", CAN.main, values) return packer.make_can_msg("ACCDATA_3", CAN.main, values)

@ -9,17 +9,17 @@ def create_steer_command(packer, steer, steer_req):
return packer.make_can_msg("STEERING_LKA", 0, values) return packer.make_can_msg("STEERING_LKA", 0, values)
def create_lta_steer_command(packer, steer, steer_req, raw_cnt): def create_lta_steer_command(packer, steer_angle, steer_req, frame):
"""Creates a CAN message for the Toyota LTA Steer Command.""" """Creates a CAN message for the Toyota LTA Steer Command."""
values = { values = {
"COUNTER": raw_cnt + 128, "COUNTER": frame + 128,
"SETME_X1": 1, "SETME_X1": 1,
"SETME_X3": 3, "SETME_X3": 3,
"PERCENTAGE": 100, "PERCENTAGE": 100,
"SETME_X64": 0, "SETME_X64": 0,
"ANGLE": 0, "ANGLE": 0,
"STEER_ANGLE_CMD": steer, "STEER_ANGLE_CMD": steer_angle,
"STEER_REQUEST": steer_req, "STEER_REQUEST": steer_req,
"STEER_REQUEST_2": steer_req, "STEER_REQUEST_2": steer_req,
"BIT": 0, "BIT": 0,

Loading…
Cancel
Save