Skip to content

Commit 47db923

Browse files
authored
Add SWA_01 message detail and CRC support for VW MQB (#236)
* Add canonical SWA_01 message and signal info * SWA_01 CRC validation * Decimal to int, to match the rest of the file
1 parent c98fe2a commit 47db923

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

can/common.cc

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ unsigned int volkswagen_crc(unsigned int address, uint64_t d, int l) {
106106
case 0x30C: // ACC_02 Automatic Cruise Control
107107
crc ^= (uint8_t[]){0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F}[counter];
108108
break;
109+
case 0x30F: // SWA_01 Lane Change Assist (SpurWechselAssistent)
110+
crc ^= (uint8_t[]){0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C}[counter];
111+
break;
109112
case 0x3C0: // Klemmen_Status_01 ignition and starting status
110113
crc ^= (uint8_t[]){0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3}[counter];
111114
break;

vw_mqb_2010.dbc

+20-3
Original file line numberDiff line numberDiff line change
@@ -1254,9 +1254,26 @@ BO_ 695 RCTA_01: 8 XXX
12541254
SG_ RCTA_01_BZ : 8|4@1+ (1,0) [0|15] "" XXX
12551255
SG_ RCTA_01_CRC : 0|8@1+ (1,0) [0|255] "" XXX
12561256

1257-
BO_ 783 SWA_01: 8 XXX
1258-
SG_ SWA_01_BZ : 8|4@1+ (1,0) [0|15] "" XXX
1259-
SG_ SWA_01_CRC : 0|8@1+ (1,0) [0|255] "" XXX
1257+
BO_ 783 SWA_01: 8 Gateway_MQB
1258+
SG_ CHECKSUM : 0|8@1+ (1,0) [0|255] "" Vector__XXX
1259+
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" Vector__XXX
1260+
SG_ SWA_Anzeigen : 12|4@1+ (1,0) [0|15] "" Kombi_D4
1261+
SG_ SWA_Blindheit_erkannt : 16|1@1+ (1,0) [0|1] "" Vector__XXX
1262+
SG_ SWA_rel_Nichtverf : 17|1@1+ (1,0) [0|1] "" Vector__XXX
1263+
SG_ SWA_rel_Fehler : 18|1@1+ (1,0) [0|1] "" Vector__XXX
1264+
SG_ SWA_Sta_aktiv : 19|1@1+ (1,0) [0|1] "" Vector__XXX
1265+
SG_ SWA_Sta_passiv : 20|1@1+ (1,0) [0|1] "" Vector__XXX
1266+
SG_ SWA_Standziele_li : 24|1@1+ (1,0) [0|1] "" Vector__XXX
1267+
SG_ SWA_Kolonne_li : 25|1@1+ (1,0) [0|1] "" Vector__XXX
1268+
SG_ SWA_Infostufe_SWA_li : 26|1@1+ (1,0) [0|1] "" Vector__XXX
1269+
SG_ SWA_Warnung_SWA_li : 27|1@1+ (1,0) [0|1] "" Vector__XXX
1270+
SG_ SWA_Kolonne_mi : 33|1@1+ (1,0) [0|1] "" Vector__XXX
1271+
SG_ SWA_Standziele_re : 40|1@1+ (1,0) [0|1] "" Vector__XXX
1272+
SG_ SWA_Kolonne_re : 41|1@1+ (1,0) [0|1] "" Vector__XXX
1273+
SG_ SWA_Infostufe_SWA_re : 42|1@1+ (1,0) [0|1] "" Vector__XXX
1274+
SG_ SWA_Warnung_SWA_re : 43|1@1+ (1,0) [0|1] "" Vector__XXX
1275+
SG_ SWA_Gischtzaehler : 48|7@1+ (1,0) [0|100] "Unit_PerCent" Vector__XXX
1276+
SG_ SWA_KD_Fehler : 59|1@1+ (1,0) [0|1] "" Vector__XXX
12601277

12611278
BO_ 804 ACC_04: 8 XXX
12621279
SG_ ACC_04_CRC : 0|8@1+ (1,0) [0|255] "" XXX

0 commit comments

Comments
 (0)