diff --git a/CHANGELOGS.md b/CHANGELOGS.md index a3b8d3ea6e..8718c78ad9 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -3,7 +3,6 @@ sunnypilot - 0.9.4.1 (2023-08-xx) * UPDATED: Synced with commaai's 0.9.4 release * NEW❗: Moonrise driving model * NEW❗: Ford upstream models support - * G.A.C. support for Ford will be implemented in future updates * UPDATED: Dynamic Lane Profile selector in the "SP - Controls" menu * REMOVED: Dynamic Lane Profile driving screen UI button * FIXED: Disallow torque lateral control for angle control platforms (e.g. Ford, Nissan, Tesla) diff --git a/selfdrive/car/ford/carcontroller.py b/selfdrive/car/ford/carcontroller.py index dd30bc57e1..8c199877bc 100644 --- a/selfdrive/car/ford/carcontroller.py +++ b/selfdrive/car/ford/carcontroller.py @@ -102,7 +102,7 @@ class CarController: 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, fcw_alert, CS.out.cruiseState.standstill, hud_control, - CS.acc_tja_status_stock_values)) + CS.acc_tja_status_stock_values, CS.gac_tr)) self.main_on_last = main_on self.lkas_enabled_last = CC.latActive diff --git a/selfdrive/car/ford/fordcan.py b/selfdrive/car/ford/fordcan.py index a49d7ad85d..b89a57e367 100644 --- a/selfdrive/car/ford/fordcan.py +++ b/selfdrive/car/ford/fordcan.py @@ -143,7 +143,7 @@ def create_acc_msg(packer, CAN: CanBus, long_active: bool, gas: float, accel: fl def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, fcw_alert: bool, standstill: bool, - hud_control, stock_values: dict): + hud_control, stock_values: dict, gac_tr): """ Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam assist status. @@ -211,7 +211,7 @@ def create_acc_ui_msg(packer, CAN: CanBus, CP, main_on: bool, enabled: bool, fcw "AccFllwMde_B_Dsply": 1 if hud_control.leadVisible else 0, # Lead indicator "AccStopMde_B_Dsply": 1 if standstill else 0, "AccWarn_D_Dsply": 0, # ACC warning - "AccTGap_D_Dsply": 4, # Fixed time gap in UI + "AccTGap_D_Dsply": gac_tr, # Fixed time gap in UI }) # Forwards FCW alert from IPMA diff --git a/selfdrive/car/ford/interface.py b/selfdrive/car/ford/interface.py index 39fc6324de..d8a555d130 100644 --- a/selfdrive/car/ford/interface.py +++ b/selfdrive/car/ford/interface.py @@ -120,6 +120,7 @@ class CarInterface(CarInterfaceBase): if not self.CS.prev_lkas_enabled and self.CS.lkas_enabled: self.CS.madsEnabled = not self.CS.madsEnabled self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled) + ret, self.CS = self.toggle_gac(ret, self.CS, self.CS.buttonStates["gapAdjustCruise"], 1, 3, 4, "-") else: self.CS.madsEnabled = False