Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
740 commits
Select commit Hold shift + click to select a range
12add21
Update mebcan.py adaption override hms
infiniteCable Nov 25, 2024
32cabd5
Update carcontroller.py fix
infiniteCable Nov 25, 2024
33511d3
Update carcontroller.py fix
infiniteCable Nov 25, 2024
3df1aea
Update carcontroller.py works, make a hint here also
infiniteCable Nov 25, 2024
7d0f50c
Update vw_meb.dbc correct relative speed signals after reevaluation
infiniteCable Nov 25, 2024
d396df5
Update radar_interface.py fix wrong conversion, relative speed is in m/s
infiniteCable Nov 25, 2024
836cca8
Update interface.py allow MEB radar for network location gateway
infiniteCable Nov 25, 2024
036acdf
Update carstate.py add acc hud values for passing through stock dista…
infiniteCable Nov 25, 2024
34f96e7
Update carcontroller.py
infiniteCable Nov 25, 2024
5c48808
Update carstate.py
infiniteCable Nov 25, 2024
d1b7f43
Update carcontroller.py
infiniteCable Nov 25, 2024
ff34745
Update mebcan.py
infiniteCable Nov 25, 2024
f36ee28
Update carcontroller.py
infiniteCable Nov 25, 2024
56c2b60
Update mebcan.py
infiniteCable Nov 25, 2024
711717c
Update carcontroller.py
infiniteCable Nov 25, 2024
514692c
Update carcontroller.py
infiniteCable Nov 25, 2024
4593a50
Update carcontroller.py
infiniteCable Nov 26, 2024
34bfc44
Update vw_meb.dbc a little bit less of long distance for a safer dist…
infiniteCable Nov 26, 2024
5b21a69
Update carcontroller.py get this out again, no effect and let it be now
infiniteCable Nov 26, 2024
8432a39
Update carcontroller.py
infiniteCable Nov 26, 2024
1b13bf2
Update mebcan.py away with this
infiniteCable Nov 26, 2024
65f22e5
Update carcontroller.py static
infiniteCable Nov 26, 2024
c90a4c8
Update carstate.py away with this for now
infiniteCable Nov 26, 2024
04e2ce8
Update mebcan.py
infiniteCable Nov 26, 2024
87930b7
Update mebcan.py
infiniteCable Nov 26, 2024
4981f68
Update mebcan.py
infiniteCable Nov 26, 2024
17299b3
Update mebcan.py
infiniteCable Nov 26, 2024
fee695c
Update vw_meb.dbc
infiniteCable Nov 26, 2024
7517629
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Nov 26, 2024
4ff0306
Merge branch 'master' of https://github.com/infiniteCable/opendbc
infiniteCable2 Nov 26, 2024
59961ea
Update interface.py
infiniteCable Nov 26, 2024
242170e
Update interface.py get this out again depracated
infiniteCable Nov 26, 2024
cff467d
Update carstate.py prepare emergency assist status tracking
infiniteCable Nov 26, 2024
6e93f5b
Update carstate.py
infiniteCable Nov 26, 2024
1e8a8d0
Update interface.py
infiniteCable Nov 26, 2024
bbc0ed6
Update interface.py for testing
infiniteCable Nov 27, 2024
6a72e87
Update carcontroller.py
infiniteCable Nov 27, 2024
7946807
Update mebcan.py
infiniteCable Nov 27, 2024
a7f559f
Update mebcan.py
infiniteCable Nov 27, 2024
e90375a
Update carcontroller.py
infiniteCable Nov 27, 2024
f657bc8
Update interface.py
infiniteCable Nov 27, 2024
3dfd47e
Update mebcan.py add information for HCA_03
infiniteCable Nov 28, 2024
e857784
Update interface.py remove this again here, will test further in anot…
infiniteCable Nov 28, 2024
bcbac5f
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Nov 28, 2024
90b4826
Merge branch 'master' of https://github.com/infiniteCable/opendbc
infiniteCable2 Nov 28, 2024
d22b912
Update vw_meb.dbc
infiniteCable Nov 29, 2024
f386525
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Nov 29, 2024
e6beb40
Update mebcan.py remove conversion
infiniteCable Nov 29, 2024
6df1b8e
Update interface.py
infiniteCable Nov 29, 2024
897683a
Update interface.py
infiniteCable Nov 30, 2024
3d6df87
Update carstate.py
infiniteCable Dec 2, 2024
bcc8dd1
Update carstate.py
infiniteCable Dec 2, 2024
7ef779a
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 2, 2024
19108a3
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 3, 2024
6477e8e
Update values.py add car params cupra born
infiniteCable Dec 3, 2024
3c2e6d7
Update interface.py change actuator delays a little bit for MEB
infiniteCable Dec 3, 2024
f795ba8
Update values.py
infiniteCable Dec 3, 2024
640b1ca
Update values.py adaption car params cupra born
infiniteCable Dec 3, 2024
bdb9ab7
Update values.py fix car param
infiniteCable Dec 3, 2024
ee3eced
Update values.py
infiniteCable Dec 3, 2024
13e6aa9
Update values.py change tireStiffnessFactor a little bit
infiniteCable Dec 4, 2024
eadebfa
Update interface.py higher long act delay
infiniteCable Dec 4, 2024
6040331
Update vw_meb.dbc further scaling of long accel
infiniteCable Dec 4, 2024
3cf77ef
Update vw_meb.dbc further rough experimental scaling of accels
infiniteCable Dec 4, 2024
c32c1f3
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 6, 2024
47c90db
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 7, 2024
44da774
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 10, 2024
878eee0
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 12, 2024
e92daf9
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 13, 2024
be2e924
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 14, 2024
1928b0c
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 17, 2024
e0d13d0
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 19, 2024
6cc8c58
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Dec 23, 2024
695304f
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Jan 4, 2025
fc5fe65
Update vw_meb.dbc adaptions for distance ranges and meb_esp_04 singal…
infiniteCable Jan 7, 2025
1ca85f0
Update values.py add vw travel assist flag for dynamic detection
infiniteCable Jan 8, 2025
d8618b6
Update interface.py add vw travel assist detection
infiniteCable Jan 8, 2025
59e5ce6
Update carstate.py adapt MEB VW travel assist signal to dynamic detec…
infiniteCable Jan 8, 2025
7644a6a
Update vw_meb.dbc probably a status value
infiniteCable Jan 9, 2025
e51760e
Update values.py docs adaption meb
infiniteCable Jan 11, 2025
fc2e061
Update values.py add cars id.3, id.4 (id.5 shares id.4 chassis code)
infiniteCable Jan 11, 2025
bf82cfb
Update fingerprints.py prepare volkswagen ID.x models
infiniteCable Jan 11, 2025
89bcd47
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Jan 20, 2025
30dc037
Update values.py user intervention steering power reduction in percent
infiniteCable Jan 20, 2025
00e5861
Update carcontroller.py steering power reduction by user intervention…
infiniteCable Jan 20, 2025
c0a1f65
Update carcontroller.py increase steering power for increasing curvat…
infiniteCable Jan 20, 2025
c07bb71
Update values.py
infiniteCable Jan 20, 2025
c89855d
Update values.py fix gap button value MEB
infiniteCable Jan 21, 2025
dadca0f
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Jan 28, 2025
7baa478
Update fingerprints.py comment out, just a prep
infiniteCable Jan 28, 2025
c6b0c0f
Update values.py comment out, just prepped
infiniteCable Jan 28, 2025
d6ef59b
Update carcontroller.py fix data type
infiniteCable Jan 28, 2025
0b69668
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Feb 6, 2025
41e0b80
Update vw_meb.dbc latest dbc state
infiniteCable Feb 6, 2025
1ca879e
Update carstate.py renaming signals and current state
infiniteCable Feb 6, 2025
a35f7e5
Update values.py changed safety limits, ldw values
infiniteCable Feb 6, 2025
8f4a891
Update interface.py
infiniteCable Feb 6, 2025
71253b6
Update carcontroller.py use curvature from car, correct max limiting …
infiniteCable Feb 6, 2025
31f2182
Update mebcan.py rename signals
infiniteCable Feb 6, 2025
cdb5889
Update common.cc renaming and new signal
infiniteCable Feb 6, 2025
2aedfaf
Update README.md hint self analzed signals in readme
infiniteCable Feb 6, 2025
1cdac78
Update values.py rename
infiniteCable Feb 6, 2025
4662e3e
Update carstate.py fix renaming
infiniteCable Feb 6, 2025
b293c54
Update vw_meb.dbc rename to counter and checksum for check
infiniteCable Feb 6, 2025
23ac129
Update vw_meb.dbc current state
infiniteCable Feb 18, 2025
9e42be2
Update values.py extra travel assist flag probably not needed
infiniteCable Feb 18, 2025
cadbfbf
Update carstate.py fix travel assist, no extra logic needed, it is pr…
infiniteCable Feb 18, 2025
5e500b9
Update interface.py remove ta logic, probably not needed
infiniteCable Feb 18, 2025
c6a30a5
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Feb 18, 2025
74ecccf
Update carstate.py fix signal sources, r242 is probably always presen…
infiniteCable Feb 18, 2025
ea9d319
Update vw_meb.dbc
infiniteCable Feb 18, 2025
60c5da4
Update vw_meb.dbc
infiniteCable Feb 18, 2025
f4f4554
Update mebcan.py add eps update from mqb for testing because of ea br…
infiniteCable Feb 18, 2025
6adbfec
Update interface.py add hca presence flag for MEB
infiniteCable Feb 18, 2025
e14c0bb
Update interface.py commenting, TODO for anti EA intervention
infiniteCable Feb 18, 2025
5525006
Update carstate.py camera should always be present for current plattf…
infiniteCable Feb 19, 2025
170643f
Merge branch 'master' of https://github.com/commaai/opendbc
infiniteCable2 Feb 20, 2025
3db9eec
add MEB safety and adapt after upstream safety movements
infiniteCable2 Feb 20, 2025
87e9c67
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 21, 2025
6e3d148
linting: line length and whitespace
jyoung8607 Feb 21, 2025
3eab2a3
linting: unused imports
jyoung8607 Feb 21, 2025
aa141a9
temporary test route
jyoung8607 Feb 21, 2025
196e6cd
safety test checkpoint
jyoung8607 Feb 21, 2025
fbcb27e
fix LH_EPS_03 filtering for EA mitigation
jyoung8607 Feb 21, 2025
e52c77e
fix safety monitoring of driver input torque
jyoung8607 Feb 21, 2025
9f22e5e
comment tweaks
jyoung8607 Feb 22, 2025
469f974
start with ID.4 only
jyoung8607 Feb 22, 2025
a267782
move MEB safety under DEBUG for now
jyoung8607 Feb 22, 2025
a3ccba4
more ID.4 only to start
jyoung8607 Feb 22, 2025
4035e70
harness parts, regen docs
jyoung8607 Feb 22, 2025
5514742
elide superfluous import
jyoung8607 Feb 22, 2025
5b93224
fix test route reference
jyoung8607 Feb 22, 2025
08d05e9
MEB safety is both CANFD and DEBUG
jyoung8607 Feb 22, 2025
42b708b
set aside Travel Assist HUD logic for now
jyoung8607 Feb 22, 2025
342db1a
cleanup
jyoung8607 Feb 22, 2025
8956b1d
cleanup
jyoung8607 Feb 22, 2025
afbc89f
HCA appears to be standard on MEB
jyoung8607 Feb 22, 2025
8c727dc
doesn't actually work yet
jyoung8607 Feb 22, 2025
6c38a91
add longitudinal acceleration test
jyoung8607 Feb 22, 2025
12d07dd
relocate angle steer limit controls
jyoung8607 Feb 22, 2025
f3d28bd
another TODO
jyoung8607 Feb 22, 2025
c9e8104
partial dead code cleanup
jyoung8607 Feb 22, 2025
7da323d
more comments
jyoung8607 Feb 22, 2025
c95e8b6
more review notes for test driving tomorrow
jyoung8607 Feb 22, 2025
711c6f1
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 22, 2025
16a2e05
Revert "safety: pull out cam -> pt fwd blocking (#1785)"
jyoung8607 Feb 22, 2025
ea12217
temp disable EA mitigation
jyoung8607 Feb 22, 2025
cfe31b2
to receive the message, you must send the message
jyoung8607 Feb 22, 2025
c20b62f
temp disable, constant false-firing, fix later
jyoung8607 Feb 22, 2025
ee3948f
temp experiment with static power level
jyoung8607 Feb 22, 2025
d488094
try moar?
jyoung8607 Feb 22, 2025
6338da0
hax
jyoung8607 Feb 22, 2025
a351149
well this oughta be different
jyoung8607 Feb 22, 2025
ec6d51f
a bit more actuator delay
jyoung8607 Feb 23, 2025
5a202d6
gate ACC and LKA fault detection on drive mode
jyoung8607 Feb 23, 2025
ad451e5
TIGHT TIGHT TIGHT
jyoung8607 Feb 23, 2025
8424c87
combine identical mqbcan/mebcan packers
jyoung8607 Feb 23, 2025
37a5e8a
garbage collection
jyoung8607 Feb 23, 2025
1235a8e
use auto trans type
jyoung8607 Feb 23, 2025
305be7d
revert README changes
jyoung8607 Feb 23, 2025
e140c80
consolidate checksum handling code
jyoung8607 Feb 23, 2025
ebdcc73
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 23, 2025
8e3aa24
re-enable BSM
jyoung8607 Feb 23, 2025
d09f5ed
BSM signal fixes, tolerate Side Assist being disabled
jyoung8607 Feb 23, 2025
09d0f22
fix Blinkmodi_02 frequency
jyoung8607 Feb 23, 2025
068e20d
EA mitigation
jyoung8607 Feb 23, 2025
cec9c68
bugfix
jyoung8607 Feb 23, 2025
44a80b0
more EA mitigation
jyoung8607 Feb 23, 2025
874696f
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 24, 2025
acd0313
cleanup, will bring back other cars later
jyoung8607 Feb 24, 2025
4f277b8
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 24, 2025
8d07046
cleanup merge detritus
jyoung8607 Feb 24, 2025
3aa0dd7
GC unused messages
jyoung8607 Feb 24, 2025
c8ce2e6
Gateway_73 aggregate/proxy for GE_Fahrstufe
jyoung8607 Feb 24, 2025
c74cb3b
test using gateway aggregate for MEB gearshift position
jyoung8607 Feb 24, 2025
119bfd9
temp disable door-open checks
jyoung8607 Feb 24, 2025
bfd2012
migrate more gearshift position handling
jyoung8607 Feb 24, 2025
26c666e
add MQB gateway aggregates for EPB and gearshift
jyoung8607 Feb 24, 2025
56e72a1
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 24, 2025
04cc426
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 24, 2025
80c0fe0
HCA_03 fixes
jyoung8607 Feb 25, 2025
8f86df4
packer fixes corresponding to DBC fixes
jyoung8607 Feb 25, 2025
5d60986
definitely legitimate safety
jyoung8607 Feb 25, 2025
6a1e19a
lint
jyoung8607 Feb 25, 2025
2b3e634
clipping to zero is wrong here
jyoung8607 Feb 25, 2025
b7ec06c
extremely legitimate power safety
jyoung8607 Feb 25, 2025
8942e36
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 25, 2025
f064309
re-enable ZV_02 door open detection for MEB
jyoung8607 Feb 25, 2025
8372859
cleanup
jyoung8607 Feb 25, 2025
f4eb0f4
set aside alpha long for initial merge
jyoung8607 Feb 25, 2025
6f8a04f
more
jyoung8607 Feb 25, 2025
279d2d7
set aside more alpha long stuff
jyoung8607 Feb 25, 2025
a850485
start commonizing MQB/MEB safety code
jyoung8607 Feb 25, 2025
903b1c7
more common code
jyoung8607 Feb 25, 2025
e5fc3c6
MISRA
jyoung8607 Feb 25, 2025
c09886b
more cleanup
jyoung8607 Feb 25, 2025
445a1ea
more cleanup
jyoung8607 Feb 25, 2025
c130c07
checkpoint
jyoung8607 Feb 25, 2025
d93673c
checkpoint
jyoung8607 Feb 25, 2025
7df32c0
cleanup
jyoung8607 Feb 25, 2025
4bbeb67
don't need those
jyoung8607 Feb 25, 2025
8c23e1b
additional alpha long cleanup
jyoung8607 Feb 25, 2025
1d35d99
whitespace cleanup
jyoung8607 Feb 25, 2025
86eaadd
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Feb 25, 2025
c229ed6
work around mutation test issue
jyoung8607 Feb 27, 2025
dca79ca
remove curvature clipping
jyoung8607 Feb 27, 2025
6f7a5dd
limit steering with power control
jyoung8607 Feb 27, 2025
a577be3
clarity
jyoung8607 Feb 27, 2025
9c5fa74
fix MQB EA
jyoung8607 Feb 27, 2025
44fd11f
inline power control
jyoung8607 Feb 27, 2025
6af0c06
additional cleanup and clarity
jyoung8607 Feb 27, 2025
18dd5d7
more
jyoung8607 Feb 27, 2025
f048411
slight wordsmithing
jyoung8607 Feb 27, 2025
23d222b
write the test first, like a grownup
jyoung8607 Feb 27, 2025
bb8086d
lateral control safety WIP
jyoung8607 Feb 27, 2025
123ac15
more tests
jyoung8607 Feb 27, 2025
4a64b71
clarity
jyoung8607 Feb 27, 2025
1122aaa
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Mar 4, 2025
ed51e1a
partial MISRA cleanup
jyoung8607 Mar 4, 2025
7a786ae
refactor with GET_BYTES, cleanup
jyoung8607 Mar 4, 2025
0e8f52b
a little more MISRA
jyoung8607 Mar 4, 2025
f51b316
a liiiiitle more MISRA
jyoung8607 Mar 4, 2025
4e87485
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Mar 4, 2025
a388ac3
cleanup
jyoung8607 Mar 4, 2025
c7270a2
I am dumb
jyoung8607 Mar 4, 2025
c33d857
fix wrong WMI for Euro ID.4
jyoung8607 Mar 5, 2025
3b206fc
update safety test
jyoung8607 Mar 6, 2025
a60a584
temp disable steer power check
jyoung8607 Mar 6, 2025
93ad780
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Mar 6, 2025
df8fd30
Merge branch 'master' into vw-meb
jyoung8607 Mar 12, 2025
ba02993
follow safety refactor
jyoung8607 Mar 12, 2025
1d34b3d
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Mar 15, 2025
248c46a
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Mar 24, 2025
69730c9
C3+RP support
jyoung8607 Apr 18, 2025
521ad35
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Jul 29, 2025
a88e43d
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Jul 29, 2025
0a95304
to_push -> msg
jyoung8607 Jul 29, 2025
a8ca3a7
adeeb's on another rampage
jyoung8607 Jul 29, 2025
e0734ce
merge conflicts don't always bail ya out
jyoung8607 Jul 29, 2025
664c69c
dashcam
jyoung8607 Jul 29, 2025
c91f335
temp deactivate
jyoung8607 Jul 29, 2025
6fe0101
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Jul 29, 2025
c533330
Revert "temp deactivate"
jyoung8607 Jul 29, 2025
7f8ef43
typo fix
jyoung8607 Jul 29, 2025
2063ecc
will need a vEgoCluster signal for MEB
jyoung8607 Jul 29, 2025
2593883
we're gonna circle back to that
jyoung8607 Jul 29, 2025
c3ff345
Merge branch 'master' of ssh://github.com/commaai/opendbc into vw-meb
jyoung8607 Jul 29, 2025
d6b451b
fix scope
jyoung8607 Jul 29, 2025
a9d2bab
don't use a safety that isn't there yet
jyoung8607 Jul 29, 2025
776aec7
concise
jyoung8607 Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
|Volkswagen|Golf R 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Volkswagen|Golf SportsVan 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Volkswagen|Grand California 2019-24|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Volkswagen|ID.4 2021-25|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Volkswagen|Jetta 2015-18|Adaptive Cruise Control (ACC) & Lane Assist|[Dashcam mode](#dashcam)|
|Volkswagen|Jetta 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
|Volkswagen|Jetta GLI 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/docs_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class CarHarness(EnumBase):
fca = BaseCarHarness("FCA connector")
ram = BaseCarHarness("Ram connector")
vw_a = BaseCarHarness("VW A connector")
vw_c = BaseCarHarness("VW C connector")
vw_j533 = BaseCarHarness("VW J533 connector", parts=[Accessory.harness_box, Cable.long_obdc_cable, Cable.usbc_coupler])
hyundai_a = BaseCarHarness("Hyundai A connector")
hyundai_b = BaseCarHarness("Hyundai B connector")
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/tests/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ class CarTestRoute(NamedTuple):
CarTestRoute("ffcd23abbbd02219/2024-02-28--14-59-38", VOLKSWAGEN.VOLKSWAGEN_CADDY_MK3),
CarTestRoute("cae14e88932eb364/2021-03-26--14-43-28", VOLKSWAGEN.VOLKSWAGEN_GOLF_MK7), # Stock ACC
CarTestRoute("3cfdec54aa035f3f/2022-10-13--14-58-58", VOLKSWAGEN.VOLKSWAGEN_GOLF_MK7), # openpilot longitudinal
CarTestRoute("17fbdc1cd49dc9af/00000027--ee57555e5b", VOLKSWAGEN.VOLKSWAGEN_ID4_MK1), # FIXME: temporary, replace later
CarTestRoute("578742b26807f756|00000010--41ee3e5bec", VOLKSWAGEN.VOLKSWAGEN_JETTA_MK6),
CarTestRoute("58a7d3b707987d65/2021-03-25--17-26-37", VOLKSWAGEN.VOLKSWAGEN_JETTA_MK7),
CarTestRoute("4d134e099430fba2/2021-03-26--00-26-06", VOLKSWAGEN.VOLKSWAGEN_PASSAT_MK8),
Expand Down
1 change: 1 addition & 0 deletions opendbc/car/torque_data/override.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"CHEVROLET_EQUINOX" = [2.5, 2.5, 0.05]
"CHEVROLET_VOLT_2019" = [1.4, 1.4, 0.16]
"VOLKSWAGEN_CADDY_MK3" = [1.2, 1.2, 0.1]
"VOLKSWAGEN_ID4_MK1" = [nan, 2.5, nan]
"VOLKSWAGEN_PASSAT_NMS" = [2.5, 2.5, 0.1]
"VOLKSWAGEN_SHARAN_MK2" = [2.5, 2.5, 0.1]
"HYUNDAI_SANTA_CRUZ_1ST_GEN" = [2.7, 2.7, 0.1]
Expand Down
107 changes: 75 additions & 32 deletions opendbc/car/volkswagen/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from opendbc.car import Bus, DT_CTRL, apply_driver_steer_torque_limits, structs
from opendbc.car.common.conversions import Conversions as CV
from opendbc.car.interfaces import CarControllerBase
from opendbc.car.volkswagen import mqbcan, pqcan
from opendbc.car.volkswagen import mqbcan, pqcan, mebcan
from opendbc.car.volkswagen.values import CanBus, CarControllerParams, VolkswagenFlags

VisualAlert = structs.CarControl.HUDControl.VisualAlert
Expand All @@ -13,13 +13,22 @@
class CarController(CarControllerBase):
def __init__(self, dbc_names, CP):
super().__init__(dbc_names, CP)
self.CCP = CarControllerParams(CP)
self.CAN = CanBus(CP)
self.CCS = pqcan if CP.flags & VolkswagenFlags.PQ else mqbcan
self.CCP = CarControllerParams(CP)
self.packer_pt = CANPacker(dbc_names[Bus.pt])

self.CCS = mqbcan
if CP.flags & VolkswagenFlags.PQ:
self.CCS = pqcan
elif CP.flags & VolkswagenFlags.MEB:
self.CCS = mebcan

self.aeb_available = not CP.flags & VolkswagenFlags.PQ
self.openpilot_longitudinal = self.CP.openpilotLongitudinalControl and not self.CP.flags & VolkswagenFlags.MEB

self.apply_torque_last = 0
self.apply_curvature_last = 0
self.apply_steer_power_last = 0
self.gra_acc_counter_last = None
self.eps_timer_soft_disable_alert = False
self.hca_frame_timer_running = 0
Expand All @@ -33,37 +42,63 @@ def update(self, CC, CS, now_nanos):
# **** Steering Controls ************************************************ #

if self.frame % self.CCP.STEER_STEP == 0:
# Logic to avoid HCA state 4 "refused":
# * Don't steer unless HCA is in state 3 "ready" or 5 "active"
# * Don't steer at standstill
# * Don't send > 3.00 Newton-meters torque
# * Don't send the same torque for > 6 seconds
# * Don't send uninterrupted steering for > 360 seconds
# MQB racks reset the uninterrupted steering timer after a single frame
# of HCA disabled; this is done whenever output happens to be zero.

if CC.latActive:
new_torque = int(round(actuators.torque * self.CCP.STEER_MAX))
apply_torque = apply_driver_steer_torque_limits(new_torque, self.apply_torque_last, CS.out.steeringTorque, self.CCP)
self.hca_frame_timer_running += self.CCP.STEER_STEP
if self.apply_torque_last == apply_torque:
self.hca_frame_same_torque += self.CCP.STEER_STEP
if self.hca_frame_same_torque > self.CCP.STEER_TIME_STUCK_TORQUE / DT_CTRL:
apply_torque -= (1, -1)[apply_torque < 0]
self.hca_frame_same_torque = 0
if self.CP.flags & VolkswagenFlags.MEB:
# The QFK (lateral control coordinator) control loop compares actuation curvature to its own current curvature
# Calibrate our actuator command by the offset between openpilot's vehicle model and QFK perceived curvatures
apply_curvature = actuators.curvature + (CS.qfk_curvature - CC.currentCurvature)

# Progressive QFK power control: smooth engage and disengage, reduce power when the driver is overriding
qfk_enable = True
if CC.latActive:
min_power = max(self.apply_steer_power_last - self.CCP.STEERING_POWER_STEP, self.CCP.STEERING_POWER_MIN)
max_power = max(self.apply_steer_power_last + self.CCP.STEERING_POWER_STEP, self.CCP.STEERING_POWER_MAX)
target_power = int(np.interp(CS.out.steeringTorque, [self.CCP.STEER_DRIVER_ALLOWANCE, self.CCP.STEER_DRIVER_MAX],
[self.CCP.STEERING_POWER_MAX, self.CCP.STEERING_POWER_MIN]))
apply_steer_power = min(max(target_power, min_power), max_power)
elif self.apply_steer_power_last > 0:
apply_steer_power = max(self.apply_steer_power_last - self.CCP.STEERING_POWER_STEP, 0)
else:
self.hca_frame_same_torque = 0
hca_enabled = abs(apply_torque) > 0
qfk_enable = False
apply_curvature = 0
apply_steer_power = 0

can_sends.append(mebcan.create_steering_control(self.packer_pt, self.CAN.pt, apply_curvature, qfk_enable, apply_steer_power))

self.apply_curvature_last = apply_curvature
self.apply_steer_power_last = apply_steer_power

else:
hca_enabled = False
apply_torque = 0
# Logic to avoid HCA state 4 "refused":
# * Don't steer unless HCA is in state 3 "ready" or 5 "active"
# * Don't steer at standstill
# * Don't send > 3.00 Newton-meters torque
# * Don't send the same torque for > 6 seconds
# * Don't send uninterrupted steering for > 360 seconds
# MQB racks reset the uninterrupted steering timer after a single frame
# of HCA disabled; this is done whenever output happens to be zero.

if CC.latActive:
new_torque = int(round(actuators.torque * self.CCP.STEER_MAX))
apply_torque = apply_driver_steer_torque_limits(new_torque, self.apply_torque_last, CS.out.steeringTorque, self.CCP)
self.hca_frame_timer_running += self.CCP.STEER_STEP
if self.apply_torque_last == apply_torque:
self.hca_frame_same_torque += self.CCP.STEER_STEP
if self.hca_frame_same_torque > self.CCP.STEER_TIME_STUCK_TORQUE / DT_CTRL:
apply_torque -= (1, -1)[apply_torque < 0]
self.hca_frame_same_torque = 0
else:
self.hca_frame_same_torque = 0
hca_enabled = abs(apply_torque) > 0
else:
hca_enabled = False
apply_torque = 0

if not hca_enabled:
self.hca_frame_timer_running = 0
if not hca_enabled:
self.hca_frame_timer_running = 0

self.eps_timer_soft_disable_alert = self.hca_frame_timer_running > self.CCP.STEER_TIME_ALERT / DT_CTRL
self.apply_torque_last = apply_torque
can_sends.append(self.CCS.create_steering_control(self.packer_pt, self.CAN.pt, apply_torque, hca_enabled))
self.eps_timer_soft_disable_alert = self.hca_frame_timer_running > self.CCP.STEER_TIME_ALERT / DT_CTRL
self.apply_torque_last = apply_torque
can_sends.append(self.CCS.create_steering_control(self.packer_pt, self.CAN.pt, apply_torque, hca_enabled))

if self.CP.flags & VolkswagenFlags.STOCK_HCA_PRESENT:
# Pacify VW Emergency Assist driver inactivity detection by changing its view of driver steering input torque
Expand All @@ -74,9 +109,16 @@ def update(self, CC, CS, now_nanos):
ea_simulated_torque = CS.out.steeringTorque
can_sends.append(self.CCS.create_eps_update(self.packer_pt, self.CAN.cam, CS.eps_stock_values, ea_simulated_torque))

# TODO: refactor a bit
if self.CP.flags & VolkswagenFlags.MEB:
if self.frame % 2 == 0:
can_sends.append(mebcan.create_ea_control(self.packer_pt, self.CAN.pt))
if self.frame % 50 == 0:
can_sends.append(mebcan.create_ea_hud(self.packer_pt, self.CAN.pt))

# **** Acceleration Controls ******************************************** #

if self.CP.openpilotLongitudinalControl:
if self.openpilot_longitudinal:
if self.frame % self.CCP.ACC_CONTROL_STEP == 0:
acc_control = self.CCS.acc_control_value(CS.out.cruiseState.available, CS.out.accFaulted, CC.longActive)
accel = float(np.clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) if CC.longActive else 0)
Expand All @@ -100,7 +142,7 @@ def update(self, CC, CS, now_nanos):
can_sends.append(self.CCS.create_lka_hud_control(self.packer_pt, self.CAN.pt, CS.ldw_stock_values, CC.latActive,
CS.out.steeringPressed, hud_alert, hud_control))

if self.frame % self.CCP.ACC_HUD_STEP == 0 and self.CP.openpilotLongitudinalControl:
if self.frame % self.CCP.ACC_HUD_STEP == 0 and self.openpilot_longitudinal:
lead_distance = 0
if hud_control.leadVisible and self.frame * DT_CTRL > 1.0: # Don't display lead until we know the scaling factor
lead_distance = 512 if CS.upscale_lead_car_signal else 8
Expand All @@ -121,6 +163,7 @@ def update(self, CC, CS, now_nanos):
new_actuators = actuators.as_builder()
new_actuators.torque = self.apply_torque_last / self.CCP.STEER_MAX
new_actuators.torqueOutputCan = self.apply_torque_last
new_actuators.curvature = float(self.apply_curvature_last)

self.gra_acc_counter_last = CS.gra_stock_values["COUNTER"]
self.frame += 1
Expand Down
65 changes: 62 additions & 3 deletions opendbc/car/volkswagen/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def __init__(self, CP):
self.esp_hold_confirmation = False
self.upscale_lead_car_signal = False
self.eps_stock_values = False
self.qfk_curvature = 0.

def update_button_enable(self, buttonEvents: list[structs.CarState.ButtonEvent]):
if not self.CP.pcmCruise:
Expand Down Expand Up @@ -61,7 +62,54 @@ def update(self, can_parsers) -> structs.CarState:
else:
ret.gearShifter = self.parse_gear_shifter(self.CCP.shifter_values.get(pt_cp.vl["Gateway_73"]["GE_Fahrstufe"], None))

if True:
if self.CP.flags & VolkswagenFlags.MEB:
# MEB-specific
self.qfk_curvature = -pt_cp.vl["QFK_01"]["Curvature"] * (1, -1)[int(pt_cp.vl["QFK_01"]["Curvature_VZ"])]
ret.fuelGauge = pt_cp.vl["Motor_16"]["MO_Energieinhalt_BMS"] # TODO: is this available on MQB as well?

self.parse_wheel_speeds(ret,
pt_cp.vl["ESC_51"]["VL_Radgeschw"],
pt_cp.vl["ESC_51"]["VR_Radgeschw"],
pt_cp.vl["ESC_51"]["HL_Radgeschw"],
pt_cp.vl["ESC_51"]["HR_Radgeschw"],
)

hca_status = self.CCP.hca_status_values.get(pt_cp.vl["QFK_01"]["LatCon_HCA_Status"])

drive_mode = ret.gearShifter == GearShifter.drive
ret.gasPressed = pt_cp.vl["Motor_54"]["Accelerator_Pressure"] > 0
ret.brake = pt_cp.vl["ESC_51"]["Brake_Pressure"]
ret.brakePressed = bool(pt_cp.vl["Motor_14"]["MO_Fahrer_bremst"]) # includes regen braking by user
ret.parkingBrake = pt_cp.vl["Gateway_73"]["EPB_Status"] in (1, 4) # EPB closing or closed

ret.doorOpen = any([pt_cp.vl["ZV_02"]["ZV_FT_offen"],
pt_cp.vl["ZV_02"]["ZV_BT_offen"],
pt_cp.vl["ZV_02"]["ZV_HFS_offen"],
pt_cp.vl["ZV_02"]["ZV_HBFS_offen"],
pt_cp.vl["ZV_02"]["ZV_HD_offen"]])

if self.CP.enableBsm:
ret.leftBlindspot = bool(ext_cp.vl["MEB_Side_Assist_01"]["Blind_Spot_Info_Left"]) or bool(ext_cp.vl["MEB_Side_Assist_01"]["Blind_Spot_Warn_Left"])
ret.rightBlindspot = bool(ext_cp.vl["MEB_Side_Assist_01"]["Blind_Spot_Info_Right"]) or bool(ext_cp.vl["MEB_Side_Assist_01"]["Blind_Spot_Warn_Right"])

ret.stockFcw = bool(pt_cp.vl["VMM_02"]["FCW_Active"]) or bool(ext_cp.vl["AWV_03"]["FCW_Active"])
ret.stockAeb = bool(pt_cp.vl["VMM_02"]["AEB_Active"])

self.travel_assist_available = bool(cam_cp.vl["TA_01"]["Travel_Assist_Available"])
self.acc_type = ext_cp.vl["ACC_18"]["ACC_Typ"]
self.esp_hold_confirmation = bool(pt_cp.vl["VMM_02"]["ESP_Hold"])
acc_limiter_mode = bool(ext_cp.vl["MEB_ACC_01"]["ACC_Limiter_Mode"])
speed_limiter_mode = bool(pt_cp.vl["Motor_51"]["TSK_Limiter_ausgewaehlt"])

ret.cruiseState.available = pt_cp.vl["Motor_51"]["TSK_Status"] in (2, 3, 4, 5)
ret.cruiseState.enabled = pt_cp.vl["Motor_51"]["TSK_Status"] in (3, 4, 5)
ret.cruiseState.speed = int(round(ext_cp.vl["MEB_ACC_01"]["ACC_Wunschgeschw_02"])) * CV.KPH_TO_MS if self.CP.pcmCruise else 0
ret.accFaulted = drive_mode and pt_cp.vl["Motor_51"]["TSK_Status"] in (6, 7)

ret.leftBlinker = bool(pt_cp.vl["Blinkmodi_02"]["BM_links"])
ret.rightBlinker = bool(pt_cp.vl["Blinkmodi_02"]["BM_rechts"])

else:
# MQB-specific
if self.CP.flags & VolkswagenFlags.KOMBI_PRESENT:
self.upscale_lead_car_signal = bool(pt_cp.vl["Kombi_03"]["KBI_Variante"]) # Analog vs digital instrument cluster
Expand All @@ -78,6 +126,8 @@ def update(self, can_parsers) -> structs.CarState:
ret.carFaultedNonCritical = bool(cam_cp.vl["HCA_01"]["EA_Ruckfreigabe"]) or cam_cp.vl["HCA_01"]["EA_ACC_Sollstatus"] > 0 # EA

drive_mode = True
ret.vEgoCluster = pt_cp.vl["Kombi_01"]["KBI_angez_Geschw"] * CV.KPH_TO_MS
ret.gasPressed = pt_cp.vl["Motor_20"]["MO_Fahrpedalrohwert_01"] > 0
ret.brake = pt_cp.vl["ESP_05"]["ESP_Bremsdruck"] / 250.0 # FIXME: this is pressure in Bar, not sure what OP expects
brake_pedal_pressed = bool(pt_cp.vl["Motor_14"]["MO_Fahrer_bremst"])
brake_pressure_detected = bool(pt_cp.vl["ESP_05"]["ESP_Fahrer_bremst"])
Expand Down Expand Up @@ -112,15 +162,13 @@ def update(self, can_parsers) -> structs.CarState:
ret.rightBlinker = bool(pt_cp.vl["Blinkmodi_02"]["Comfort_Signal_Right"])

# Shared logic
ret.vEgoCluster = pt_cp.vl["Kombi_01"]["KBI_angez_Geschw"] * CV.KPH_TO_MS

ret.steeringAngleDeg = pt_cp.vl["LWI_01"]["LWI_Lenkradwinkel"] * (1, -1)[int(pt_cp.vl["LWI_01"]["LWI_VZ_Lenkradwinkel"])]
ret.steeringRateDeg = pt_cp.vl["LWI_01"]["LWI_Lenkradw_Geschw"] * (1, -1)[int(pt_cp.vl["LWI_01"]["LWI_VZ_Lenkradw_Geschw"])]
ret.steeringTorque = pt_cp.vl["LH_EPS_03"]["EPS_Lenkmoment"] * (1, -1)[int(pt_cp.vl["LH_EPS_03"]["EPS_VZ_Lenkmoment"])]
ret.steeringPressed = abs(ret.steeringTorque) > self.CCP.STEER_DRIVER_ALLOWANCE
ret.steerFaultTemporary, ret.steerFaultPermanent = self.update_hca_state(hca_status, drive_mode)

ret.gasPressed = pt_cp.vl["Motor_20"]["MO_Fahrpedalrohwert_01"] > 0
ret.espActive = bool(pt_cp.vl["ESP_21"]["ESP_Eingriff"])
ret.espDisabled = pt_cp.vl["ESP_21"]["ESP_Tastung_passiv"] != 0
ret.seatbeltUnlatched = pt_cp.vl["Airbag_02"]["AB_Gurtschloss_FA"] != 3
Expand Down Expand Up @@ -253,6 +301,8 @@ def update_hca_state(self, hca_status, drive_mode=True):
def get_can_parsers(CP):
if CP.flags & VolkswagenFlags.PQ:
return CarState.get_can_parsers_pq(CP)
elif CP.flags & VolkswagenFlags.MEB:
return CarState.get_can_parsers_meb(CP)

# another case of the 1-50Hz
cam_messages = []
Expand All @@ -276,3 +326,12 @@ def get_can_parsers_pq(CP):
Bus.cam: CANParser(DBC[CP.carFingerprint][Bus.pt], [], CanBus(CP).cam),
}

@staticmethod
def get_can_parsers_meb(CP):
return {
Bus.pt: CANParser(DBC[CP.carFingerprint][Bus.pt], [
# the 50->1Hz is currently too much for the CANParser to figure out
("Blinkmodi_02", 1), # From J519 BCM (sent at 1Hz when no lights active, 50Hz when active)
], CanBus.pt),
Bus.cam: CANParser(DBC[CP.carFingerprint][Bus.pt], [], CanBus.cam),
}
8 changes: 8 additions & 0 deletions opendbc/car/volkswagen/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,14 @@
b'\xf1\x875Q0907572R \xf1\x890771',
],
},
CAR.VOLKSWAGEN_ID4_MK1: {
(Ecu.srs, 0x715, None): [
b'\xf1\x875WA959655R \xf1\x890717',
],
(Ecu.fwdRadar, 0x757, None): [
b'\xf1\x871EA907572H \xf1\x890234',
],
},
CAR.SKODA_FABIA_MK4: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8705C906032L \xf1\x891701',
Expand Down
16 changes: 16 additions & 0 deletions opendbc/car/volkswagen/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, alp
# Panda ALLOW_DEBUG firmware required.
ret.dashcamOnly = True

elif ret.flags & VolkswagenFlags.MEB:
# Set global MEB parameters
ret.dashcamOnly = True # In development, safety code not yet available
safety_configs = [get_safety_config(structs.CarParams.SafetyModel.noOutput)]
ret.enableBsm = 0x24C in fingerprint[0] # MEB_Side_Assist_01
ret.steerControlType = structs.CarParams.SteerControlType.angle
ret.transmissionType = TransmissionType.automatic

if any(msg in fingerprint[1] for msg in (0x520, 0x86, 0xFD, 0x13D)): # Airbag_02, LWI_01, ESP_21, QFK_01
ret.networkLocation = NetworkLocation.gateway
else:
ret.networkLocation = NetworkLocation.fwdCamera


else:
# Set global MQB parameters
safety_configs = [get_safety_config(structs.CarParams.SafetyModel.volkswagen)]
Expand Down Expand Up @@ -65,6 +79,8 @@ def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, alp
if ret.flags & VolkswagenFlags.PQ:
ret.steerActuatorDelay = 0.2
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
elif ret.flags & VolkswagenFlags.MEB:
ret.steerActuatorDelay = 0.2
else:
ret.steerActuatorDelay = 0.1
ret.lateralTuning.pid.kpBP = [0.]
Expand Down
34 changes: 34 additions & 0 deletions opendbc/car/volkswagen/mebcan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import opendbc.car.volkswagen.mqbcan as mqbcan


create_eps_update = mqbcan.create_eps_update
create_lka_hud_control = mqbcan.create_lka_hud_control
create_acc_buttons_control = mqbcan.create_acc_buttons_control


def create_steering_control(packer, bus, apply_curvature, lkas_enabled, power):
values = {
"Curvature": abs(apply_curvature), # in rad/m
"Curvature_VZ": 1 if apply_curvature > 0 and lkas_enabled else 0,
"Power": power if lkas_enabled else 0,
"RequestStatus": 4 if lkas_enabled else 2,
"HighSendRate": lkas_enabled,
}
return packer.make_can_msg("HCA_03", bus, values)


def create_ea_control(packer, bus):
values = {
"EA_Funktionsstatus": 1, # Configured but disabled
"EA_Sollbeschleunigung": 2046, # Inactive value
}

return packer.make_can_msg("EA_01", bus, values)


def create_ea_hud(packer, bus):
values = {
"EA_Unknown": 1, # Undocumented, value when inactive
}

return packer.make_can_msg("EA_02", bus, values)
Loading
Loading