Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion opendbc/car/volkswagen/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def update_pq(self, pt_cp, cam_cp, ext_cp) -> structs.CarState:

# Update ACC radar status.
self.acc_type = ext_cp.vl["ACC_System"]["ACS_Typ_ACC"]
ret.cruiseState.available = bool(pt_cp.vl["Motor_5"]["GRA_Hauptschalter"])
ret.cruiseState.available = bool(pt_cp.vl["Motor_5"]["MO5_GRA_Hauptsch"])
ret.cruiseState.enabled = pt_cp.vl["Motor_2"]["MO2_Sta_GRA"] in (1, 2)
if self.CP.pcmCruise:
ret.accFaulted = ext_cp.vl["ACC_GRA_Anzeige"]["ACA_StaACC"] in (6, 7)
Expand Down
157 changes: 120 additions & 37 deletions opendbc/dbc/vw_pq.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NS_ :
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
SG_MUL_VAL_

BS_:

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

BO_ 1152 Motor_5: 8 XXX
SG_ CHECKSUM : 56|8@1+ (1,0) [0|0] "" XXX
SG_ Motortext_Bits__4_1_ : 52|4@1+ (1,0) [0|0] "" XXX
SG_ Doppelte_Momente : 51|1@1+ (1,0) [0|0] "" XXX
SG_ GRA_Hauptschalter : 50|1@1+ (1,0) [0|0] "" XXX
SG_ Anlasser_Ausspuren : 49|1@1+ (1,0) [0|0] "" XXX
SG_ Anlasser_Freigabe : 48|1@1+ (1,0) [0|0] "" XXX
SG_ Klimadrucksignal__Motor_5_ : 40|8@1+ (0.2,0) [0|50.8] "bar" XXX
SG_ K_hlerluefteransteuerung : 32|8@1+ (0.4,0) [0|101.6] "%" XXX
SG_ Verbrauch_Ueberlauf : 31|1@1+ (1,0) [0|0] "" XXX
SG_ Kraftstoffverbrauchssignal : 16|15@1+ (1,0) [0|32767] "ul" XXX
SG_ Klimakompressor_Leistungsreduzi : 15|1@1+ (1,0) [0|0] "" XXX
SG_ Kennfeldkuehlung : 14|1@1+ (1,0) [0|0] "" XXX
SG_ Klimakompressor_aus__Motor_5_ : 13|1@1+ (1,0) [0|0] "" XXX
SG_ CAT_Warnung : 12|1@1+ (1,0) [0|0] "" XXX
SG_ OBD_2_Lampe : 11|1@1+ (1,0) [0|0] "" XXX
SG_ E_Gas_Lampe : 10|1@1+ (1,0) [0|0] "" XXX
SG_ Vorgluehlampe__Motor_5_ : 9|1@1+ (1,0) [0|0] "" XXX
SG_ Ladekontroll_Lampe : 8|1@1+ (1,0) [0|0] "" XXX
SG_ Multiplex_Code M : 6|2@1+ (1,0) [0|0] "" XXX
SG_ Multiplex_Info_norm__Verbrauch m3 : 0|6@1+ (20,0) [0|1260] "l/Zyl" XXX
SG_ Multiplex_Info_Motortyp m2 : 0|6@1+ (1,0) [0|0] "" XXX
SG_ Multiplex_Info_Drehzahl_MD_Max m1 : 0|6@1+ (100,0) [0|6300] "U/min" XXX
SG_ Multiplex_Info_Max_Drehmoment m0 : 0|6@1+ (10,0) [0|630] "Nm" XXX
BO_ 1152 Motor_5: 8 Motor
SG_ MO5_Mp_Code M : 6|2@1+ (1,0) [0|3] "" Gateway
SG_ MO5_max_Moment m0 : 0|6@1+ (10,0) [0|630] "Nm" Gateway
SG_ MO5_Drehzahl m1 : 0|6@1+ (100,0) [0|6300] "U/min" Gateway
SG_ MO5_Motortyp m2 : 0|6@1+ (1,0) [0|63] "" Gateway
SG_ MO5_Abgastyp m3 : 0|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Abgastyp2 m3 : 1|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Abgastyp3 m3 : 2|1@1+ (1,0) [0|1] "" Gateway
SG_ OBD_Kaltstart_Denominator m3 : 3|1@1+ (1,0) [0|1] "" Gateway
SG_ OBD_Minimum_Trip m3 : 4|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_DPF_reg m3 : 5|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Vorgluehen : 9|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_E_Gas : 10|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_OBD_2 : 11|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Heissl : 12|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_KlimaKompr : 13|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Feld_kuehl : 14|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_KliKo_Red : 15|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Verbrauch : 16|15@1+ (1,0) [0|32767] "µl" KOMBI
SG_ MO5_UeberlVerb : 31|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Luefter : 32|8@1+ (0.4,0) [0|101.6] "%" Gateway
SG_ MO5_HLeuchte : 40|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_PartikelLamp : 41|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Sta_BKU : 42|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_TypStartSteu : 43|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_TDE_Lampe : 44|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_TDE_Text : 45|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_DZM_Daempf : 46|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Interlock : 47|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Start : 48|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Anlasser : 49|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_GRA_Hauptsch : 50|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Momente : 51|1@1+ (1,0) [0|1] "" Gateway
SG_ MO5_Motortext1 : 52|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Motortext2 : 53|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Motortext3 : 54|1@1+ (1,0) [0|1] "" KOMBI
SG_ MO5_Motortext4 : 55|1@1+ (1,0) [0|1] "" KOMBI
SG_ CHECKSUM : 56|8@1+ (1,0) [0|255] "" Gateway

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

CM_ SG_ 1096 Zaehler_Waehlhebel_1 "Counter Waehlhebel_1";

CM_ SG_ 1152 CHECKSUM "Checksum Motor_5";
CM_ SG_ 1152 Anlasser_Ausspuren "Starter Disable";
CM_ SG_ 1152 Anlasser_Freigabe "Starter Release";
CM_ SG_ 1152 Klimadrucksignal__Motor_5_ "Air conditioning pressure signal";
CM_ SG_ 1152 Kraftstoffverbrauchssignal "Fuel consumption signal";
CM_ SG_ 1152 K_hlerluefteransteuerung "Cooling fan control signal";
CM_ SG_ 1152 Klimakompressor_Leistungsreduzi "Air conditioning compressor power reduction flag";
CM_ SG_ 1152 Klimakompressor_aus__Motor_5_ "Air conditioning compressor";
CM_ SG_ 1152 Anlasser_Freigabe "Starter release";
CM_ SG_ 1152 OBD_2_Lampe "OBD light";
CM_ SG_ 1152 E_Gas_Lampe "ETB light";
CM_ SG_ 1152 Ladekontroll_Lampe "Charge light";
CM_ SG_ 1152 Vorgluehlampe__Motor_5_ "Glow light";
CM_ BO_ 1152 "Motor message 5 - Contains engine type, consumption, lamps, and diagnostic info";

CM_ SG_ 1152 MO5_Mp_Code "Multiplex selector - switches every 4 transmissions";
CM_ SG_ 1152 MO5_max_Moment "Maximum torque when Mp_Code=0 (0-630 Nm)";
CM_ SG_ 1152 MO5_Drehzahl "Engine speed at max torque when Mp_Code=1 (0-6300 RPM)";
CM_ SG_ 1152 MO5_Motortyp "Engine type info when Mp_Code=2 (cylinder count, turbo, fuel type)";
CM_ SG_ 1152 MO5_Abgastyp "Exhaust type EOBD when Mp_Code=3";
CM_ SG_ 1152 MO5_Abgastyp2 "Exhaust type OBD when Mp_Code=3";
CM_ SG_ 1152 MO5_Abgastyp3 "DPF installed when Mp_Code=3";
CM_ SG_ 1152 OBD_Kaltstart_Denominator "Cold start denominator increment when Mp_Code=3";
CM_ SG_ 1152 OBD_Minimum_Trip "Minimum normalized trip when Mp_Code=3";
CM_ SG_ 1152 MO5_DPF_reg "DPF regenerating when Mp_Code=3";
CM_ SG_ 1152 MO5_Vorgluehen "Diesel pre-glow lamp";
CM_ SG_ 1152 MO5_E_Gas "E-Gas system lamp (petrol only)";
CM_ SG_ 1152 MO5_OBD_2 "OBD/MIL lamp control";
CM_ SG_ 1152 MO5_Heissl "Coolant overheat warning lamp";
CM_ SG_ 1152 MO5_KlimaKompr "AC compressor off request";
CM_ SG_ 1152 MO5_Feld_kuehl "Map cooling installed and OK";
CM_ SG_ 1152 MO5_KliKo_Red "AC compressor power reduction";
CM_ SG_ 1152 MO5_Verbrauch "Fuel consumption counter (15-bit, µl)";
CM_ SG_ 1152 MO5_UeberlVerb "Consumption counter overflow";
CM_ SG_ 1152 MO5_Luefter "Cooling fan PWM control (0-101.6%)";
CM_ SG_ 1152 MO5_HLeuchte "Overheat pre-warning";
CM_ SG_ 1152 MO5_PartikelLamp "Particle filter lamp";
CM_ SG_ 1152 MO5_Sta_BKU "Brake vacuum pump status (Porsche only)";
CM_ SG_ 1152 MO5_TypStartSteu "Starter control type: 0=BSG/BCM, 1=MSG";
CM_ SG_ 1152 MO5_TDE_Lampe "Fuel cap warning lamp (petrol only)";
CM_ SG_ 1152 MO5_TDE_Text "Fuel cap text display (petrol only)";
CM_ SG_ 1152 MO5_DZM_Daempf "RPM gauge damping control";
CM_ SG_ 1152 MO5_Interlock "Interlock switch for manual transmission start";
CM_ SG_ 1152 MO5_Start "Automatic start permission";
CM_ SG_ 1152 MO5_Anlasser "Starter control permission";
CM_ SG_ 1152 MO5_GRA_Hauptsch "GRA main switch / readiness";
CM_ SG_ 1152 MO5_Momente "MDI torque values doubled";
CM_ SG_ 1152 MO5_Motortext1 "Text: Engine workshop";
CM_ SG_ 1152 MO5_Motortext2 "Text: Exhaust workshop (deprecated)";
CM_ SG_ 1152 MO5_Motortext3 "Text: Fuel system fault";
CM_ SG_ 1152 MO5_Motortext4 "Text: Particle filter needs regeneration";
CM_ SG_ 1152 CHECKSUM "Checksum with final value 0x0";

CM_ SG_ 1160 Zaehler_Motor_6 "Counter Motor_6";
CM_ SG_ 1160 Hoeheninfo__Motor_6_ "Altitude Correction";
Expand Down Expand Up @@ -1744,6 +1785,16 @@ SG_MUL_VAL_ 648 MO2_max_Mo MO2_Mp_Code 3-3;
SG_MUL_VAL_ 648 MO2_CAN_Vers MO2_Mp_Code 0-0;
SG_MUL_VAL_ 648 MO2_Motor_Code MO2_Mp_Code 1-1;

SG_MUL_VAL_ 1152 MO5_max_Moment MO5_Mp_Code 0-0;
SG_MUL_VAL_ 1152 MO5_Drehzahl MO5_Mp_Code 1-1;
SG_MUL_VAL_ 1152 MO5_Motortyp MO5_Mp_Code 2-2;
SG_MUL_VAL_ 1152 MO5_Abgastyp MO5_Mp_Code 3-3;
SG_MUL_VAL_ 1152 MO5_Abgastyp2 MO5_Mp_Code 3-3;
SG_MUL_VAL_ 1152 MO5_Abgastyp3 MO5_Mp_Code 3-3;
SG_MUL_VAL_ 1152 OBD_Kaltstart_Denominator MO5_Mp_Code 3-3;
SG_MUL_VAL_ 1152 OBD_Minimum_Trip MO5_Mp_Code 3-3;
SG_MUL_VAL_ 1152 MO5_DPF_reg MO5_Mp_Code 3-3;

VAL_ 648 MO2_Mp_Code 0 "CAN_Stand" 1 "Motor_Kod" 2 "Getriebe_Kod" 3 "MDI_Max";

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";
Expand Down Expand Up @@ -1833,6 +1884,38 @@ VAL_ 1088 GE1_Infobit 0 "Standard Automatic" 1 "CVT";
VAL_ 1088 GE1_SleepInd 0 "CAN is Required" 1 "Sleep Ready";
VAL_ 1088 GE1_Fehlereintr 0 "No Failure Memory Entry" 1 "Failure Memory Entry";

VAL_ 1152 MO5_Mp_Code 0 "Max_Moment" 1 "Drehzahl" 2 "Motor_Typ" 3 "Abgastyp_od_norm_Verbrauch";
VAL_ 1152 MO5_Abgastyp 0 "no_EOBD" 1 "EOBD";
VAL_ 1152 MO5_Abgastyp2 0 "no_OBD" 1 "OBD";
VAL_ 1152 MO5_Abgastyp3 0 "no_DPF_verbaut" 1 "DPF_verbaut";
VAL_ 1152 OBD_Kaltstart_Denominator 0 "Denominator_not_hochzaehlen" 1 "Bedingungen_zum_Inkr_des_Kaltstart_Denom_erf";
VAL_ 1152 OBD_Minimum_Trip 0 "no_Min_Normed_Trip" 1 "Min_Normed_Trip";
VAL_ 1152 MO5_DPF_reg 0 "DPF_regeneriert_nicht" 1 "DPF_regeneriert";
VAL_ 1152 MO5_Vorgluehen 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_E_Gas 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_OBD_2 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_Heissl 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_KlimaKompr 0 "no_Anforderung" 1 "Klimakompr_aus";
VAL_ 1152 MO5_Feld_kuehl 0 "no" 1 "yes";
VAL_ 1152 MO5_KliKo_Red 0 "no" 1 "yes";
VAL_ 1152 MO5_UeberlVerb 0 "no_Ueberlauf" 1 "mindestens_einmal_uebergelaufen";
VAL_ 1152 MO5_HLeuchte 0 "no_Warnung" 1 "Vorwarnung";
VAL_ 1152 MO5_PartikelLamp 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_Sta_BKU 0 "iO_oder_not_verbaut" 1 "n_iO";
VAL_ 1152 MO5_TypStartSteu 0 "Startersteuerung_BSG_BCM_KessyD1_ZAS" 1 "Startersteuerung_durch_MSG";
VAL_ 1152 MO5_TDE_Lampe 0 "Lamp_off" 1 "Lamp_on";
VAL_ 1152 MO5_TDE_Text 0 "no_Text" 1 "Textanzeige_nach_ISO";
VAL_ 1152 MO5_DZM_Daempf 0 "normale_Daempfung" 1 "dynamische_Daempfung";
VAL_ 1152 MO5_Interlock 0 "Interlock_not_betaetigt" 1 "Interlock_betaetigt";
VAL_ 1152 MO5_Start 0 "Start_not_zulaessig" 1 "Startfreigabe";
VAL_ 1152 MO5_Anlasser 0 "Anlasser_darf_angesteuert_werden" 1 "Anlasser_ausspuren_Ansteuerung_not_moeglich";
VAL_ 1152 MO5_GRA_Hauptsch 0 "Off" 1 "On";
VAL_ 1152 MO5_Momente 0 "Einfach" 1 "Doppelt";
VAL_ 1152 MO5_Motortext1 0 "no_Text" 1 "Text_1";
VAL_ 1152 MO5_Motortext2 0 "no_Text" 1 "Text_2";
VAL_ 1152 MO5_Motortext3 0 "no_Text" 1 "Text_3";
VAL_ 1152 MO5_Motortext4 0 "no_Text" 1 "Text_4";

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" ;
VAL_ 1386 ACA_ID_StaACC 0 "keine_Anzeige" ;
VAL_ 1386 ACA_Fahrerhinw 1 "Ein" 0 "Aus" ;
Expand Down
2 changes: 1 addition & 1 deletion opendbc/safety/modes/volkswagen_pq.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void volkswagen_pq_rx_hook(const CANPacket_t *msg) {
if (volkswagen_longitudinal) {
if (msg->addr == MSG_MOTOR_5) {
// ACC main switch on is a prerequisite to enter controls, exit controls immediately on main switch off
// Signal: Motor_5.GRA_Hauptschalter
// Signal: Motor_5.MO5_GRA_Hauptsch
acc_main_on = GET_BIT(msg, 50U);
if (!acc_main_on) {
controls_allowed = false;
Expand Down
2 changes: 1 addition & 1 deletion opendbc/safety/tests/test_volkswagen_pq.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _motor_2_msg(self, brake_pressed=False, cruise_engaged=False):

# ACC main switch status
def _motor_5_msg(self, main_switch=False):
values = {"GRA_Hauptschalter": main_switch}
values = {"MO5_GRA_Hauptsch": main_switch}
return self.packer.make_can_msg_safety("Motor_5", 0, values)

# Driver throttle input (Motor_3)
Expand Down