Updates to Volkswagen port (#1147)

* Remove unreachable Radar Fault alert code
* Update max torque
pull/1211/head
Jason Young 2020-03-06 01:45:28 -05:00 committed by GitHub
parent 6ff881f789
commit c2200baf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 25 deletions

2
panda

@ -1 +1 @@
Subproject commit 43687488518a870625ee907723d74549729d7241
Subproject commit c7d0d5fc7b089094a2d42c21d25fbfb570d17677

View File

@ -61,25 +61,17 @@ class CarState(CarStateBase):
self.displayMetricUnits = not pt_cp.vl["Einheiten_01"]["KBI_MFA_v_Einheit_02"]
# Update ACC radar status.
accStatus = pt_cp.vl["ACC_06"]['ACC_Status_ACC']
if accStatus == 1:
# ACC okay but disabled
self.accFault = False
ret.cruiseState.available = False
ret.cruiseState.enabled = False
elif accStatus == 2:
accStatus = pt_cp.vl["TSK_06"]['TSK_Status']
if accStatus == 2:
# ACC okay and enabled, but not currently engaged
self.accFault = False
ret.cruiseState.available = True
ret.cruiseState.enabled = False
elif accStatus in [3, 4, 5]:
# ACC okay and enabled, currently engaged and regulating speed (3) or engaged with driver accelerating (4) or overrun (5)
self.accFault = False
ret.cruiseState.available = True
ret.cruiseState.enabled = True
else:
# ACC fault of some sort. Seen statuses 6 or 7 for CAN comms disruptions, visibility issues, etc.
self.accFault = True
# ACC okay but disabled (1), or a radar visibility or other fault/disruption (6 or 7)
ret.cruiseState.available = False
ret.cruiseState.enabled = False
@ -156,6 +148,7 @@ class CarState(CarStateBase):
("ESP_Tastung_passiv", "ESP_21", 0), # Stability control disabled
("KBI_MFA_v_Einheit_02", "Einheiten_01", 0), # MPH vs KMH speed display
("KBI_Handbremse", "Kombi_01", 0), # Manual handbrake applied
("TSK_Status", "TSK_06", 0), # ACC engagement status from drivetrain coordinator
("TSK_Fahrzeugmasse_02", "Motor_16", 0), # Estimated vehicle mass from drivetrain coordinator
("ACC_Status_ACC", "ACC_06", 0), # ACC engagement status
("ACC_Typ", "ACC_06", 0), # ACC type (follow to stop, stop&go)
@ -182,6 +175,7 @@ class CarState(CarStateBase):
("ESP_21", 50), # From J104 ABS/ESP controller
("ACC_06", 50), # From J428 ACC radar control module
("Motor_20", 50), # From J623 Engine control module
("TSK_06", 50), # From J623 Engine control module
("GRA_ACC_01", 33), # From J??? steering wheel control buttons
("ACC_02", 17), # From J428 ACC radar control module
("Getriebe_11", 20), # From J743 Auto transmission control module

View File

@ -104,13 +104,9 @@ class CarInterface(CarInterfaceBase):
events = self.create_common_events(ret, extra_gears=[GEAR.eco, GEAR.sport])
# Vehicle operation safety checks and events
# Vehicle health and operation safety checks
if self.CS.parkingBrakeSet:
events.append(create_event('parkBrake', [ET.NO_ENTRY, ET.USER_DISABLE]))
# Vehicle health safety checks and events
if self.CS.accFault:
events.append(create_event('radarFault', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if self.CS.steeringFault:
events.append(create_event('steerTempUnavailable', [ET.NO_ENTRY, ET.WARNING]))
@ -140,7 +136,7 @@ class CarInterface(CarInterfaceBase):
self.buttonStatesPrev = self.CS.buttonStates.copy()
self.CS.out = ret.as_reader()
return self.CS.out
return self.CS.out
def apply(self, c):
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators,

View File

@ -9,10 +9,10 @@ class CarControllerParams:
GRA_VBP_COUNT = 16 # Send VBP messages for ~0.5s (GRA_ACC_STEP * 16)
# Observed documented MQB limits: 3.00 Nm max, rate of change 5.00 Nm/sec.
# Limiting both torque and rate-of-change based on real-world testing and
# Comma's safety requirements for minimum time to lane departure.
STEER_MAX = 250 # Max heading control assist torque 2.50 Nm
STEER_DELTA_UP = 4 # Max HCA reached in 1.25s (STEER_MAX / (50Hz * 1.25))
# Limiting rate-of-change based on real-world testing and Comma's safety
# requirements for minimum time to lane departure.
STEER_MAX = 300 # Max heading control assist torque 3.00 Nm
STEER_DELTA_UP = 4 # Max HCA reached in 1.50s (STEER_MAX / (50Hz * 1.50))
STEER_DELTA_DOWN = 10 # Min HCA reached in 0.60s (STEER_MAX / (50Hz * 0.60))
STEER_DRIVER_ALLOWANCE = 80
STEER_DRIVER_MULTIPLIER = 3 # weight driver torque heavily

View File

@ -1 +1 @@
63d3bb517fdac3d953e67ca4a16f2c742388cdc5
49d2241353626870070cf4dac71b5ac5b105910c

View File

@ -18,11 +18,11 @@ segments = [
("HONDA", "99c94dc769b5d96e|2019-08-03--14-19-59--2"), # HONDA.CIVIC
("TOYOTA", "77611a1fac303767|2020-02-29--13-29-33--3"), # TOYOTA.COROLLA_TSS2
("GM", "7cc2a8365b4dd8a9|2018-12-02--12-10-44--2"), # GM.ACADIA
("CHRYSLER", "b6849f5cf2c926b1|2020-02-28--07-29-48--13"), # CHRYSLER.PACIFICA
("CHRYSLER", "b6849f5cf2c926b1|2020-02-28--07-29-48--13"), # CHRYSLER.PACIFICA
("HYUNDAI", "38bfd238edecbcd7|2018-08-29--22-02-15--4"), # HYUNDAI.SANTA_FE
#("CHRYSLER", "b6e1317e1bfbefa6|2020-03-04--13-11-40"), # CHRYSLER.JEEP_CHEROKEE
("SUBARU", "7873afaf022d36e2|2019-07-03--18-46-44--0"), # SUBARU.IMPREZA
("VOLKSWAGEN", "b0c9d2329ad1606b|2020-02-19--16-29-36--7"), # VW.GOLF
("VOLKSWAGEN", "76b83eb0245de90e|2020-03-05--19-16-05--3"), # VW.GOLF
# Enable when port is tested and dascamOnly is no longer set
# ("NISSAN", "fbbfa6af821552b9|2020-03-03--08-09-43--0"), # NISSAN.XTRAIL