diff --git a/cereal b/cereal index f1463a08ee..f86de2b1a3 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit f1463a08eebd98725724cb21c5966ea7b23da8b8 +Subproject commit f86de2b1a36276e2c5a3ada4a1e8f0fe3e7e5ff2 diff --git a/panda b/panda index b2cf197679..a35e9a1edb 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit b2cf1976796dbd9f700a76543466c8c9c9665827 +Subproject commit a35e9a1edb1e685f00f4dd9d874043f56ea771fc diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 4205d84781..866ff1aa20 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -419,6 +419,10 @@ std::optional send_panda_states(PubMaster *pm, const std::vector cs[j].setCanfdEnabled(can_health.canfd_enabled); cs[j].setBrsEnabled(can_health.brs_enabled); 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 diff --git a/selfdrive/car/ford/carcontroller.py b/selfdrive/car/ford/carcontroller.py index 2a930e735e..2ef80420bd 100644 --- a/selfdrive/car/ford/carcontroller.py +++ b/selfdrive/car/ford/carcontroller.py @@ -43,6 +43,7 @@ class CarController: main_on = CS.out.cruiseState.available steer_alert = hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw) + fcw_alert = hud_control.visualAlert == VisualAlert.fcw ### acc buttons ### if CC.cruiseControl.cancel: @@ -100,7 +101,7 @@ class CarController: # send acc ui msg at 5Hz or if ui state changes 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, - CS.out.cruiseState.standstill, hud_control, + fcw_alert, CS.out.cruiseState.standstill, hud_control, CS.acc_tja_status_stock_values)) self.main_on_last = main_on diff --git a/selfdrive/car/ford/fordcan.py b/selfdrive/car/ford/fordcan.py index ca95ac0a0d..a49d7ad85d 100644 --- a/selfdrive/car/ford/fordcan.py +++ b/selfdrive/car/ford/fordcan.py @@ -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) -def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, standstill: bool, hud_control, - stock_values: dict): +def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, fcw_alert: bool, standstill: bool, + hud_control, stock_values: dict): """ Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam 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 }) + # 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) diff --git a/selfdrive/car/toyota/toyotacan.py b/selfdrive/car/toyota/toyotacan.py index 1031361350..47f7612c8e 100644 --- a/selfdrive/car/toyota/toyotacan.py +++ b/selfdrive/car/toyota/toyotacan.py @@ -9,17 +9,17 @@ def create_steer_command(packer, steer, steer_req): 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.""" values = { - "COUNTER": raw_cnt + 128, + "COUNTER": frame + 128, "SETME_X1": 1, "SETME_X3": 3, "PERCENTAGE": 100, "SETME_X64": 0, "ANGLE": 0, - "STEER_ANGLE_CMD": steer, + "STEER_ANGLE_CMD": steer_angle, "STEER_REQUEST": steer_req, "STEER_REQUEST_2": steer_req, "BIT": 0,