Skip to content

Commit 337af45

Browse files
tealtwojyoung8607
andauthored
VW PQ: update Motor_5 signal definitons (#2725)
* VW PQ: update Motor_5 signal definitons * VW PQ: update carstate to match updated DBC * VW PQ: update safety mode comments to match updated signal names * VW PQ: update Motor_5 signal name to match updated DBC * VW PQ: update DBC to add proper CAN multiplex handling * Merge commaai/master --------- Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
1 parent 11f91cf commit 337af45

4 files changed

Lines changed: 123 additions & 40 deletions

File tree

opendbc/car/volkswagen/carstate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def update_pq(self, pt_cp, cam_cp, ext_cp) -> structs.CarState:
206206

207207
# Update ACC radar status.
208208
self.acc_type = ext_cp.vl["ACC_System"]["ACS_Typ_ACC"]
209-
ret.cruiseState.available = bool(pt_cp.vl["Motor_5"]["GRA_Hauptschalter"])
209+
ret.cruiseState.available = bool(pt_cp.vl["Motor_5"]["MO5_GRA_Hauptsch"])
210210
ret.cruiseState.enabled = pt_cp.vl["Motor_2"]["MO2_Sta_GRA"] in (1, 2)
211211
if self.CP.pcmCruise:
212212
ret.accFaulted = ext_cp.vl["ACC_GRA_Anzeige"]["ACA_StaACC"] in (6, 7)

opendbc/dbc/vw_pq.dbc

Lines changed: 120 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ NS_ :
2222
SIG_GROUP_
2323
SIG_VALTYPE_
2424
SIGTYPE_VALTYPE_
25+
SG_MUL_VAL_
2526

2627
BS_:
2728

@@ -330,30 +331,44 @@ BO_ 1160 Motor_6: 8 XXX
330331
SG_ Sollmoment_f_r_Getriebe : 8|8@1+ (0.39,0) [0|99] "MDI" XXX
331332
SG_ Checksumme_Motor_6 : 0|8@1+ (1,0) [0|0] "" XXX
332333

333-
BO_ 1152 Motor_5: 8 XXX
334-
SG_ CHECKSUM : 56|8@1+ (1,0) [0|0] "" XXX
335-
SG_ Motortext_Bits__4_1_ : 52|4@1+ (1,0) [0|0] "" XXX
336-
SG_ Doppelte_Momente : 51|1@1+ (1,0) [0|0] "" XXX
337-
SG_ GRA_Hauptschalter : 50|1@1+ (1,0) [0|0] "" XXX
338-
SG_ Anlasser_Ausspuren : 49|1@1+ (1,0) [0|0] "" XXX
339-
SG_ Anlasser_Freigabe : 48|1@1+ (1,0) [0|0] "" XXX
340-
SG_ Klimadrucksignal__Motor_5_ : 40|8@1+ (0.2,0) [0|50.8] "bar" XXX
341-
SG_ K_hlerluefteransteuerung : 32|8@1+ (0.4,0) [0|101.6] "%" XXX
342-
SG_ Verbrauch_Ueberlauf : 31|1@1+ (1,0) [0|0] "" XXX
343-
SG_ Kraftstoffverbrauchssignal : 16|15@1+ (1,0) [0|32767] "ul" XXX
344-
SG_ Klimakompressor_Leistungsreduzi : 15|1@1+ (1,0) [0|0] "" XXX
345-
SG_ Kennfeldkuehlung : 14|1@1+ (1,0) [0|0] "" XXX
346-
SG_ Klimakompressor_aus__Motor_5_ : 13|1@1+ (1,0) [0|0] "" XXX
347-
SG_ CAT_Warnung : 12|1@1+ (1,0) [0|0] "" XXX
348-
SG_ OBD_2_Lampe : 11|1@1+ (1,0) [0|0] "" XXX
349-
SG_ E_Gas_Lampe : 10|1@1+ (1,0) [0|0] "" XXX
350-
SG_ Vorgluehlampe__Motor_5_ : 9|1@1+ (1,0) [0|0] "" XXX
351-
SG_ Ladekontroll_Lampe : 8|1@1+ (1,0) [0|0] "" XXX
352-
SG_ Multiplex_Code M : 6|2@1+ (1,0) [0|0] "" XXX
353-
SG_ Multiplex_Info_norm__Verbrauch m3 : 0|6@1+ (20,0) [0|1260] "l/Zyl" XXX
354-
SG_ Multiplex_Info_Motortyp m2 : 0|6@1+ (1,0) [0|0] "" XXX
355-
SG_ Multiplex_Info_Drehzahl_MD_Max m1 : 0|6@1+ (100,0) [0|6300] "U/min" XXX
356-
SG_ Multiplex_Info_Max_Drehmoment m0 : 0|6@1+ (10,0) [0|630] "Nm" XXX
334+
BO_ 1152 Motor_5: 8 Motor
335+
SG_ MO5_Mp_Code M : 6|2@1+ (1,0) [0|3] "" Gateway
336+
SG_ MO5_max_Moment m0 : 0|6@1+ (10,0) [0|630] "Nm" Gateway
337+
SG_ MO5_Drehzahl m1 : 0|6@1+ (100,0) [0|6300] "U/min" Gateway
338+
SG_ MO5_Motortyp m2 : 0|6@1+ (1,0) [0|63] "" Gateway
339+
SG_ MO5_Abgastyp m3 : 0|1@1+ (1,0) [0|1] "" Gateway
340+
SG_ MO5_Abgastyp2 m3 : 1|1@1+ (1,0) [0|1] "" Gateway
341+
SG_ MO5_Abgastyp3 m3 : 2|1@1+ (1,0) [0|1] "" Gateway
342+
SG_ OBD_Kaltstart_Denominator m3 : 3|1@1+ (1,0) [0|1] "" Gateway
343+
SG_ OBD_Minimum_Trip m3 : 4|1@1+ (1,0) [0|1] "" Gateway
344+
SG_ MO5_DPF_reg m3 : 5|1@1+ (1,0) [0|1] "" Gateway
345+
SG_ MO5_Vorgluehen : 9|1@1+ (1,0) [0|1] "" KOMBI
346+
SG_ MO5_E_Gas : 10|1@1+ (1,0) [0|1] "" KOMBI
347+
SG_ MO5_OBD_2 : 11|1@1+ (1,0) [0|1] "" KOMBI
348+
SG_ MO5_Heissl : 12|1@1+ (1,0) [0|1] "" KOMBI
349+
SG_ MO5_KlimaKompr : 13|1@1+ (1,0) [0|1] "" Gateway
350+
SG_ MO5_Feld_kuehl : 14|1@1+ (1,0) [0|1] "" Gateway
351+
SG_ MO5_KliKo_Red : 15|1@1+ (1,0) [0|1] "" Gateway
352+
SG_ MO5_Verbrauch : 16|15@1+ (1,0) [0|32767] "µl" KOMBI
353+
SG_ MO5_UeberlVerb : 31|1@1+ (1,0) [0|1] "" KOMBI
354+
SG_ MO5_Luefter : 32|8@1+ (0.4,0) [0|101.6] "%" Gateway
355+
SG_ MO5_HLeuchte : 40|1@1+ (1,0) [0|1] "" KOMBI
356+
SG_ MO5_PartikelLamp : 41|1@1+ (1,0) [0|1] "" KOMBI
357+
SG_ MO5_Sta_BKU : 42|1@1+ (1,0) [0|1] "" Gateway
358+
SG_ MO5_TypStartSteu : 43|1@1+ (1,0) [0|1] "" Gateway
359+
SG_ MO5_TDE_Lampe : 44|1@1+ (1,0) [0|1] "" KOMBI
360+
SG_ MO5_TDE_Text : 45|1@1+ (1,0) [0|1] "" KOMBI
361+
SG_ MO5_DZM_Daempf : 46|1@1+ (1,0) [0|1] "" KOMBI
362+
SG_ MO5_Interlock : 47|1@1+ (1,0) [0|1] "" Gateway
363+
SG_ MO5_Start : 48|1@1+ (1,0) [0|1] "" Gateway
364+
SG_ MO5_Anlasser : 49|1@1+ (1,0) [0|1] "" Gateway
365+
SG_ MO5_GRA_Hauptsch : 50|1@1+ (1,0) [0|1] "" Gateway
366+
SG_ MO5_Momente : 51|1@1+ (1,0) [0|1] "" Gateway
367+
SG_ MO5_Motortext1 : 52|1@1+ (1,0) [0|1] "" KOMBI
368+
SG_ MO5_Motortext2 : 53|1@1+ (1,0) [0|1] "" KOMBI
369+
SG_ MO5_Motortext3 : 54|1@1+ (1,0) [0|1] "" KOMBI
370+
SG_ MO5_Motortext4 : 55|1@1+ (1,0) [0|1] "" KOMBI
371+
SG_ CHECKSUM : 56|8@1+ (1,0) [0|255] "" Gateway
357372

358373
BO_ 896 Motor_3: 8 Motor
359374
SG_ MO3_Vorgluehen : 0|1@1+ (1,0) [0|1] "" Gateway
@@ -1656,19 +1671,45 @@ CM_ SG_ 1056 Kuehlmitteltemp__4_1__Kombi_2_ "kombi coolant temperature";
16561671

16571672
CM_ SG_ 1096 Zaehler_Waehlhebel_1 "Counter Waehlhebel_1";
16581673

1659-
CM_ SG_ 1152 CHECKSUM "Checksum Motor_5";
1660-
CM_ SG_ 1152 Anlasser_Ausspuren "Starter Disable";
1661-
CM_ SG_ 1152 Anlasser_Freigabe "Starter Release";
1662-
CM_ SG_ 1152 Klimadrucksignal__Motor_5_ "Air conditioning pressure signal";
1663-
CM_ SG_ 1152 Kraftstoffverbrauchssignal "Fuel consumption signal";
1664-
CM_ SG_ 1152 K_hlerluefteransteuerung "Cooling fan control signal";
1665-
CM_ SG_ 1152 Klimakompressor_Leistungsreduzi "Air conditioning compressor power reduction flag";
1666-
CM_ SG_ 1152 Klimakompressor_aus__Motor_5_ "Air conditioning compressor";
1667-
CM_ SG_ 1152 Anlasser_Freigabe "Starter release";
1668-
CM_ SG_ 1152 OBD_2_Lampe "OBD light";
1669-
CM_ SG_ 1152 E_Gas_Lampe "ETB light";
1670-
CM_ SG_ 1152 Ladekontroll_Lampe "Charge light";
1671-
CM_ SG_ 1152 Vorgluehlampe__Motor_5_ "Glow light";
1674+
CM_ BO_ 1152 "Motor message 5 - Contains engine type, consumption, lamps, and diagnostic info";
1675+
1676+
CM_ SG_ 1152 MO5_Mp_Code "Multiplex selector - switches every 4 transmissions";
1677+
CM_ SG_ 1152 MO5_max_Moment "Maximum torque when Mp_Code=0 (0-630 Nm)";
1678+
CM_ SG_ 1152 MO5_Drehzahl "Engine speed at max torque when Mp_Code=1 (0-6300 RPM)";
1679+
CM_ SG_ 1152 MO5_Motortyp "Engine type info when Mp_Code=2 (cylinder count, turbo, fuel type)";
1680+
CM_ SG_ 1152 MO5_Abgastyp "Exhaust type EOBD when Mp_Code=3";
1681+
CM_ SG_ 1152 MO5_Abgastyp2 "Exhaust type OBD when Mp_Code=3";
1682+
CM_ SG_ 1152 MO5_Abgastyp3 "DPF installed when Mp_Code=3";
1683+
CM_ SG_ 1152 OBD_Kaltstart_Denominator "Cold start denominator increment when Mp_Code=3";
1684+
CM_ SG_ 1152 OBD_Minimum_Trip "Minimum normalized trip when Mp_Code=3";
1685+
CM_ SG_ 1152 MO5_DPF_reg "DPF regenerating when Mp_Code=3";
1686+
CM_ SG_ 1152 MO5_Vorgluehen "Diesel pre-glow lamp";
1687+
CM_ SG_ 1152 MO5_E_Gas "E-Gas system lamp (petrol only)";
1688+
CM_ SG_ 1152 MO5_OBD_2 "OBD/MIL lamp control";
1689+
CM_ SG_ 1152 MO5_Heissl "Coolant overheat warning lamp";
1690+
CM_ SG_ 1152 MO5_KlimaKompr "AC compressor off request";
1691+
CM_ SG_ 1152 MO5_Feld_kuehl "Map cooling installed and OK";
1692+
CM_ SG_ 1152 MO5_KliKo_Red "AC compressor power reduction";
1693+
CM_ SG_ 1152 MO5_Verbrauch "Fuel consumption counter (15-bit, µl)";
1694+
CM_ SG_ 1152 MO5_UeberlVerb "Consumption counter overflow";
1695+
CM_ SG_ 1152 MO5_Luefter "Cooling fan PWM control (0-101.6%)";
1696+
CM_ SG_ 1152 MO5_HLeuchte "Overheat pre-warning";
1697+
CM_ SG_ 1152 MO5_PartikelLamp "Particle filter lamp";
1698+
CM_ SG_ 1152 MO5_Sta_BKU "Brake vacuum pump status (Porsche only)";
1699+
CM_ SG_ 1152 MO5_TypStartSteu "Starter control type: 0=BSG/BCM, 1=MSG";
1700+
CM_ SG_ 1152 MO5_TDE_Lampe "Fuel cap warning lamp (petrol only)";
1701+
CM_ SG_ 1152 MO5_TDE_Text "Fuel cap text display (petrol only)";
1702+
CM_ SG_ 1152 MO5_DZM_Daempf "RPM gauge damping control";
1703+
CM_ SG_ 1152 MO5_Interlock "Interlock switch for manual transmission start";
1704+
CM_ SG_ 1152 MO5_Start "Automatic start permission";
1705+
CM_ SG_ 1152 MO5_Anlasser "Starter control permission";
1706+
CM_ SG_ 1152 MO5_GRA_Hauptsch "GRA main switch / readiness";
1707+
CM_ SG_ 1152 MO5_Momente "MDI torque values doubled";
1708+
CM_ SG_ 1152 MO5_Motortext1 "Text: Engine workshop";
1709+
CM_ SG_ 1152 MO5_Motortext2 "Text: Exhaust workshop (deprecated)";
1710+
CM_ SG_ 1152 MO5_Motortext3 "Text: Fuel system fault";
1711+
CM_ SG_ 1152 MO5_Motortext4 "Text: Particle filter needs regeneration";
1712+
CM_ SG_ 1152 CHECKSUM "Checksum with final value 0x0";
16721713

16731714
CM_ SG_ 1160 Zaehler_Motor_6 "Counter Motor_6";
16741715
CM_ SG_ 1160 Hoeheninfo__Motor_6_ "Altitude Correction";
@@ -1744,6 +1785,16 @@ SG_MUL_VAL_ 648 MO2_max_Mo MO2_Mp_Code 3-3;
17441785
SG_MUL_VAL_ 648 MO2_CAN_Vers MO2_Mp_Code 0-0;
17451786
SG_MUL_VAL_ 648 MO2_Motor_Code MO2_Mp_Code 1-1;
17461787

1788+
SG_MUL_VAL_ 1152 MO5_max_Moment MO5_Mp_Code 0-0;
1789+
SG_MUL_VAL_ 1152 MO5_Drehzahl MO5_Mp_Code 1-1;
1790+
SG_MUL_VAL_ 1152 MO5_Motortyp MO5_Mp_Code 2-2;
1791+
SG_MUL_VAL_ 1152 MO5_Abgastyp MO5_Mp_Code 3-3;
1792+
SG_MUL_VAL_ 1152 MO5_Abgastyp2 MO5_Mp_Code 3-3;
1793+
SG_MUL_VAL_ 1152 MO5_Abgastyp3 MO5_Mp_Code 3-3;
1794+
SG_MUL_VAL_ 1152 OBD_Kaltstart_Denominator MO5_Mp_Code 3-3;
1795+
SG_MUL_VAL_ 1152 OBD_Minimum_Trip MO5_Mp_Code 3-3;
1796+
SG_MUL_VAL_ 1152 MO5_DPF_reg MO5_Mp_Code 3-3;
1797+
17471798
VAL_ 648 MO2_Mp_Code 0 "CAN_Stand" 1 "Motor_Kod" 2 "Getriebe_Kod" 3 "MDI_Max";
17481799

17491800
VAL_ 648 MO2_Getr_Code 0 "_5HP19" 1 "_5HP24" 2 "AG4" 3 "VL300" 4 "VQ250" 5 "VQ35" 6 "AG4_yestco" 7 "AG5_yestco" 8 "autom_Kupplung" 9 "autom_Kupplung_mit_ASG" 10 "AG6_yestco_ZF_6HP_AISIN" 11 "DQ500_DQ250_DQ200" 12 "SQ100_SQ200" 14 "AL1000_AL551_AL951_ZF8HPx" 15 "Handschalter_konv" 16 "DL800" 17 "E_Fahrzeug__Single_Gear";
@@ -1833,6 +1884,38 @@ VAL_ 1088 GE1_Infobit 0 "Standard Automatic" 1 "CVT";
18331884
VAL_ 1088 GE1_SleepInd 0 "CAN is Required" 1 "Sleep Ready";
18341885
VAL_ 1088 GE1_Fehlereintr 0 "No Failure Memory Entry" 1 "Failure Memory Entry";
18351886

1887+
VAL_ 1152 MO5_Mp_Code 0 "Max_Moment" 1 "Drehzahl" 2 "Motor_Typ" 3 "Abgastyp_od_norm_Verbrauch";
1888+
VAL_ 1152 MO5_Abgastyp 0 "no_EOBD" 1 "EOBD";
1889+
VAL_ 1152 MO5_Abgastyp2 0 "no_OBD" 1 "OBD";
1890+
VAL_ 1152 MO5_Abgastyp3 0 "no_DPF_verbaut" 1 "DPF_verbaut";
1891+
VAL_ 1152 OBD_Kaltstart_Denominator 0 "Denominator_not_hochzaehlen" 1 "Bedingungen_zum_Inkr_des_Kaltstart_Denom_erf";
1892+
VAL_ 1152 OBD_Minimum_Trip 0 "no_Min_Normed_Trip" 1 "Min_Normed_Trip";
1893+
VAL_ 1152 MO5_DPF_reg 0 "DPF_regeneriert_nicht" 1 "DPF_regeneriert";
1894+
VAL_ 1152 MO5_Vorgluehen 0 "Lamp_off" 1 "Lamp_on";
1895+
VAL_ 1152 MO5_E_Gas 0 "Lamp_off" 1 "Lamp_on";
1896+
VAL_ 1152 MO5_OBD_2 0 "Lamp_off" 1 "Lamp_on";
1897+
VAL_ 1152 MO5_Heissl 0 "Lamp_off" 1 "Lamp_on";
1898+
VAL_ 1152 MO5_KlimaKompr 0 "no_Anforderung" 1 "Klimakompr_aus";
1899+
VAL_ 1152 MO5_Feld_kuehl 0 "no" 1 "yes";
1900+
VAL_ 1152 MO5_KliKo_Red 0 "no" 1 "yes";
1901+
VAL_ 1152 MO5_UeberlVerb 0 "no_Ueberlauf" 1 "mindestens_einmal_uebergelaufen";
1902+
VAL_ 1152 MO5_HLeuchte 0 "no_Warnung" 1 "Vorwarnung";
1903+
VAL_ 1152 MO5_PartikelLamp 0 "Lamp_off" 1 "Lamp_on";
1904+
VAL_ 1152 MO5_Sta_BKU 0 "iO_oder_not_verbaut" 1 "n_iO";
1905+
VAL_ 1152 MO5_TypStartSteu 0 "Startersteuerung_BSG_BCM_KessyD1_ZAS" 1 "Startersteuerung_durch_MSG";
1906+
VAL_ 1152 MO5_TDE_Lampe 0 "Lamp_off" 1 "Lamp_on";
1907+
VAL_ 1152 MO5_TDE_Text 0 "no_Text" 1 "Textanzeige_nach_ISO";
1908+
VAL_ 1152 MO5_DZM_Daempf 0 "normale_Daempfung" 1 "dynamische_Daempfung";
1909+
VAL_ 1152 MO5_Interlock 0 "Interlock_not_betaetigt" 1 "Interlock_betaetigt";
1910+
VAL_ 1152 MO5_Start 0 "Start_not_zulaessig" 1 "Startfreigabe";
1911+
VAL_ 1152 MO5_Anlasser 0 "Anlasser_darf_angesteuert_werden" 1 "Anlasser_ausspuren_Ansteuerung_not_moeglich";
1912+
VAL_ 1152 MO5_GRA_Hauptsch 0 "Off" 1 "On";
1913+
VAL_ 1152 MO5_Momente 0 "Einfach" 1 "Doppelt";
1914+
VAL_ 1152 MO5_Motortext1 0 "no_Text" 1 "Text_1";
1915+
VAL_ 1152 MO5_Motortext2 0 "no_Text" 1 "Text_2";
1916+
VAL_ 1152 MO5_Motortext3 0 "no_Text" 1 "Text_3";
1917+
VAL_ 1152 MO5_Motortext4 0 "no_Text" 1 "Text_4";
1918+
18361919
VAL_ 1386 ACA_StaACC 6 "ACC_rev_aus" 0 "Hauptschalter_aus" 4 "ACC_im_Hintergrund" 3 "ACC_aktiv" 1 "Reserve" 2 "ACC_passiv" 7 "ACC_irrev_aus" 5 "frei" ;
18371920
VAL_ 1386 ACA_ID_StaACC 0 "keine_Anzeige" ;
18381921
VAL_ 1386 ACA_Fahrerhinw 1 "Ein" 0 "Aus" ;

opendbc/safety/modes/volkswagen_pq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void volkswagen_pq_rx_hook(const CANPacket_t *msg) {
9999
if (volkswagen_longitudinal) {
100100
if (msg->addr == MSG_MOTOR_5) {
101101
// ACC main switch on is a prerequisite to enter controls, exit controls immediately on main switch off
102-
// Signal: Motor_5.GRA_Hauptschalter
102+
// Signal: Motor_5.MO5_GRA_Hauptsch
103103
acc_main_on = GET_BIT(msg, 50U);
104104
if (!acc_main_on) {
105105
controls_allowed = false;

opendbc/safety/tests/test_volkswagen_pq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _motor_2_msg(self, brake_pressed=False, cruise_engaged=False):
7575

7676
# ACC main switch status
7777
def _motor_5_msg(self, main_switch=False):
78-
values = {"GRA_Hauptschalter": main_switch}
78+
values = {"MO5_GRA_Hauptsch": main_switch}
7979
return self.packer.make_can_msg_safety("Motor_5", 0, values)
8080

8181
# Driver throttle input (Motor_3)

0 commit comments

Comments
 (0)