GAC: Ford support (#226)

* GAC: Ford support

* Update CHANGELOGS.md
This commit is contained in:
Jason Wen
2023-08-10 22:37:11 -04:00
committed by GitHub
parent d7a2214dc9
commit 9bc1632141
4 changed files with 4 additions and 4 deletions
-1
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1
View File
@@ -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