mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 20:42:09 +08:00
VW MQB: DBC updates and cleanup (#26053)
* VW MQB: DBC updates and cleanup * bump opendbc after merge old-commit-hash: bb61081b70e787d3defe18c74720eb4d5dbb3114
This commit is contained in:
+1
-1
Submodule opendbc updated: 04cc54d5e6...dde0ff6f44
@@ -76,7 +76,7 @@ class CarController:
|
||||
stopping = actuators.longControlState == LongCtrlState.stopping
|
||||
starting = actuators.longControlState == LongCtrlState.starting
|
||||
can_sends.extend(self.CCS.create_acc_accel_control(self.packer_pt, CANBUS.pt, CS.acc_type, CC.longActive, accel,
|
||||
acc_control, stopping, starting, CS.out.cruiseState.standstill))
|
||||
acc_control, stopping, starting, CS.esp_hold_confirmation))
|
||||
|
||||
# **** HUD Controls ***************************************************** #
|
||||
|
||||
|
||||
@@ -110,20 +110,21 @@ class CarState(CarStateBase):
|
||||
ret.cruiseState.available = True
|
||||
ret.cruiseState.enabled = False
|
||||
elif pt_cp.vl["TSK_06"]["TSK_Status"] in (3, 4, 5):
|
||||
# ACC okay and enabled, currently regulating speed (3) or driver accel override (4) or overrun coast-down (5)
|
||||
# ACC okay and enabled, currently regulating speed (3) or driver accel override (4) or brake only (5)
|
||||
ret.cruiseState.available = True
|
||||
ret.cruiseState.enabled = True
|
||||
else:
|
||||
# ACC okay but disabled (1), or a radar visibility or other fault/disruption (6 or 7)
|
||||
ret.cruiseState.available = False
|
||||
ret.cruiseState.enabled = False
|
||||
ret.cruiseState.standstill = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"])
|
||||
self.esp_hold_confirmation = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"])
|
||||
ret.cruiseState.standstill = self.CP.pcmCruise and self.esp_hold_confirmation
|
||||
ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7)
|
||||
|
||||
# Update ACC setpoint. When the setpoint is zero or there's an error, the
|
||||
# radar sends a set-speed of ~90.69 m/s / 203mph.
|
||||
if self.CP.pcmCruise:
|
||||
ret.cruiseState.speed = ext_cp.vl["ACC_02"]["ACC_Wunschgeschw"] * CV.KPH_TO_MS
|
||||
ret.cruiseState.speed = ext_cp.vl["ACC_02"]["ACC_Wunschgeschw_02"] * CV.KPH_TO_MS
|
||||
if ret.cruiseState.speed > 90:
|
||||
ret.cruiseState.speed = 0
|
||||
|
||||
@@ -478,7 +479,7 @@ class CarState(CarStateBase):
|
||||
class MqbExtraSignals:
|
||||
# Additional signal and message lists for optional or bus-portable controllers
|
||||
fwd_radar_signals = [
|
||||
("ACC_Wunschgeschw", "ACC_02"), # ACC set speed
|
||||
("ACC_Wunschgeschw_02", "ACC_02"), # ACC set speed
|
||||
("AWV2_Freigabe", "ACC_10"), # FCW brake jerk release
|
||||
("ANB_Teilbremsung_Freigabe", "ACC_10"), # AEB partial braking release
|
||||
("ANB_Zielbremsung_Freigabe", "ACC_10"), # AEB target braking release
|
||||
|
||||
@@ -59,7 +59,7 @@ def acc_hud_status_value(main_switch_on, acc_faulted, long_active):
|
||||
return hud_status
|
||||
|
||||
|
||||
def create_acc_accel_control(packer, bus, acc_type, enabled, accel, acc_control, stopping, starting, standstill):
|
||||
def create_acc_accel_control(packer, bus, acc_type, enabled, accel, acc_control, stopping, starting, esp_hold):
|
||||
commands = []
|
||||
|
||||
values = {
|
||||
|
||||
@@ -241,6 +241,7 @@ CAR_INFO: Dict[str, Union[VWCarInfo, List[VWCarInfo]]] = {
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
# All supported cars should return FW from the engine, srs, eps, and fwdRadar. Cars
|
||||
# with a manual trans won't return transmission firmware, but all other cars will.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user