-
Notifications
You must be signed in to change notification settings - Fork 1.7k
MLB: Audi B8 support #2905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
MLB: Audi B8 support #2905
Conversation
| ret.cruiseState.available = pt_cp.vl["TSK_02"]["TSK_Status"] in (0, 1, 2) | ||
| ret.cruiseState.enabled = pt_cp.vl["TSK_02"]["TSK_Status"] in (1, 2) | ||
| ret.accFaulted = pt_cp.vl["TSK_02"]["TSK_Status"] in (3,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are present on Macan and probably work the same way. I chose not to switch, at this time, because we don't actually get state of the mainswitch (cruiseState.available). There's another TSK message that does have it, but it's only present on the car's powertrain bus (bus 1 on our harness) which I prefer not to grow dependencies on. LS_01 is a possibility but then we may have to understand and track momentary-press buttons and keep state.
I would remove this for now, pending a more complete solution, at which time we'd switch all MLB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see TSK_02 on the Macan route i have, only 03, 04 and 05. Q5 only has TSK_02
Edit: Used wrong DBC. Q5 also has 03 and 04 on bus 1
| if self.CP.carFingerprint == CAR.PORSCHE_MACAN_MK1: | ||
| ret.leftBlinker = bool(pt_cp.vl["Gateway_11"]["BH_Blinker_li"]) | ||
| ret.rightBlinker = bool(pt_cp.vl["Gateway_11"]["BH_Blinker_re"]) | ||
| else: | ||
| ret.leftBlinker = bool(pt_cp.vl["Blinkmodi_01"]["BM_links"]) | ||
| ret.rightBlinker = bool(pt_cp.vl["Blinkmodi_01"]["BM_rechts"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blinkmodi_01 is present on Macan, so if we have to switch, we'd just switch all cars. I didn't want to use it because it's on-demand only: frequency zero when there's no activity. I didn't really like that.
It'll also need to be wrapped with update_blinker_from_lamp so that one-touch lane changes work right:
opendbc/opendbc/car/interfaces.py
Line 305 in b135812
| def update_blinker_from_lamp(self, blinker_time: int, left_blinker_lamp: bool, right_blinker_lamp: bool): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comfort blinkers (1 tap thing) works perfectly fine with OP on mine. Gateway_11 doesn't seem available on mine, but it is on another Facelifted Q5 on bus 1
Edit: It is on mine aswell, small problem with the harness thats now fixed
| ] | ||
| if CP.flags & VolkswagenFlags.MLB: | ||
| pt_messages += [ | ||
| ("Blinkmodi_01", math.nan) # From J519 BCM (is inactive when no lights active, 50Hz when active) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did zero not work for the frequency? math.nan is weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 gives me a can error. This is how @oscarmcnulty did it and it works
|
|
||
| BU_: Airbag_D4 EPB_D4 ESP_D4 Gateway_D4C7 Getriebe_AL551_951_D4_C7 Getriebe_DL501_C7 Getriebe_VL381_C7 LWS_D4 Motor_EDC17_D4 Motor_ME17_BY Motor_MED17_SIMOS8_D4 Motor_Slave_D4 QSP_D4 SAK_C7 SCR_C7 SCU_D4 | ||
|
|
||
| BO_ 265 ACC_01: 8 Gateway_B8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Send the DBC update in a separate PR, so we can merge that while reviewing the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #2906
| def create_acc_accel_control(packer, bus, acc_type, acc_enabled, accel, acc_control, stopping, starting, esp_hold): | ||
| values = {} | ||
| return packer.make_can_msg("ACC_05", bus, values) | ||
| return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i forgot to take that one out while troubleshooting
opendbc/car/volkswagen/values.py
Outdated
| AUDI_A4_MK4 = VolkswagenMLBPlatformConfig( | ||
| [VWCarDocs("Audi A4 B8.5 2012-15")], | ||
| VolkswagenCarSpecs(mass=1650, wheelbase=2.81), | ||
| chassis_codes={"8K"}, | ||
| wmis={WMI.AUDI_GERMANY_CAR}, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is probably part of your testing process with the various MLB users, but to set expectations, we'll want to cut down to just one car for merge validation and then merge additional cars separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it for now
154795a
|
@Dennis-NL can you share some uploaded public test routes from the vehicles you're working with? I can help with aligning working signals. |
This reverts commit 7f0fc53.
5432d2499e17e646/00000434--f9f0af36f6 |
Validation
Adding support for Audi B8:
Audi Q5 8R 2013 - 2017 (Only one thats fingerprinted for now)
Audi A4 B8.5 2012 - 2015
Audi A5 8K 2013 - 2016
Fingerprint check for Macan due to signal difference
Change seatbelt signal for compatibility between B8 and Macan
Related to: #2846