From 7397e466d9cfd7f5bc1f49218b8d2afeedec582b Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Wed, 31 Jan 2024 19:36:15 -0700 Subject: [PATCH 1/3] GM: Fix wheel direction signal (#1006) * Update wheel directions in DBC * Fix table * Update name * Update generator/gm/gm_global_a_powertrain.dbc * generate --------- Co-authored-by: Shane Smiskol --- generator/gm/gm_global_a_powertrain.dbc | 12 ++++++------ gm_global_a_powertrain_generated.dbc | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/generator/gm/gm_global_a_powertrain.dbc b/generator/gm/gm_global_a_powertrain.dbc index 1b073fdcc8..e9a5b2e8cc 100644 --- a/generator/gm/gm_global_a_powertrain.dbc +++ b/generator/gm/gm_global_a_powertrain.dbc @@ -228,12 +228,10 @@ BO_ 840 EBCMWheelSpdFront: 5 K17_EBCM SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO BO_ 842 EBCMWheelSpdRear: 5 K17_EBCM - SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO - SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO - SG_ MovingForward : 32|1@0+ (1,0) [0|1] "" XXX - SG_ MovingBackward : 33|1@0+ (1,0) [0|1] "" XXX - SG_ MovingForward2 : 35|1@1+ (1,0) [0|1] "" XXX - SG_ MovingBackward2 : 36|1@0+ (1,0) [0|1] "" XXX + SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO + SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO + SG_ RRWheelDir : 34|3@0+ (1,0) [0|7] "" NEO + SG_ RLWheelDir : 37|3@0+ (1,0) [0|7] "" NEO BO_ 869 ASCM_365: 4 K124_ASCM @@ -333,6 +331,8 @@ VAL_ 452 CruiseState 4 "Standstill" 3 "Faulted" 1 "Active" 0 "Off" ; VAL_ 309 PRNDL 3 "R" 2 "D" 1 "N" 0 "P" ; VAL_ 309 ESPButton 1 "Active" 0 "Inactive" ; VAL_ 384 LKASteeringCmdActive 1 "Active" 0 "Inactive" ; +VAL_ 842 RRWheelDir 0 "Stationary" 1 "Forward" 2 "Reverse" 3 "Unsupported" 4 "Fault"; +VAL_ 842 RLWheelDir 0 "Stationary" 1 "Forward" 2 "Reverse" 3 "Unsupported" 4 "Fault"; VAL_ 880 ACCCruiseState 2 "Adaptive" 3 "Adaptive" 4 "Non-adaptive" 5 "Non-adaptive" ; VAL_ 880 ACCLeadCar 1 "Present" 0 "Not Present" ; VAL_ 880 ACCGapLevel 3 "Far" 2 "Med" 1 "Near" 0 "Inactive" ; diff --git a/gm_global_a_powertrain_generated.dbc b/gm_global_a_powertrain_generated.dbc index 90ef830100..37ad918cb2 100644 --- a/gm_global_a_powertrain_generated.dbc +++ b/gm_global_a_powertrain_generated.dbc @@ -248,12 +248,10 @@ BO_ 840 EBCMWheelSpdFront: 5 K17_EBCM SG_ FRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO BO_ 842 EBCMWheelSpdRear: 5 K17_EBCM - SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO - SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO - SG_ MovingForward : 32|1@0+ (1,0) [0|1] "" XXX - SG_ MovingBackward : 33|1@0+ (1,0) [0|1] "" XXX - SG_ MovingForward2 : 35|1@1+ (1,0) [0|1] "" XXX - SG_ MovingBackward2 : 36|1@0+ (1,0) [0|1] "" XXX + SG_ RLWheelSpd : 7|16@0+ (0.0311,0) [0|255] "km/h" NEO + SG_ RRWheelSpd : 23|16@0+ (0.0311,0) [0|255] "km/h" NEO + SG_ RRWheelDir : 34|3@0+ (1,0) [0|7] "" NEO + SG_ RLWheelDir : 37|3@0+ (1,0) [0|7] "" NEO BO_ 869 ASCM_365: 4 K124_ASCM @@ -353,6 +351,8 @@ VAL_ 452 CruiseState 4 "Standstill" 3 "Faulted" 1 "Active" 0 "Off" ; VAL_ 309 PRNDL 3 "R" 2 "D" 1 "N" 0 "P" ; VAL_ 309 ESPButton 1 "Active" 0 "Inactive" ; VAL_ 384 LKASteeringCmdActive 1 "Active" 0 "Inactive" ; +VAL_ 842 RRWheelDir 0 "Stationary" 1 "Forward" 2 "Reverse" 3 "Unsupported" 4 "Fault"; +VAL_ 842 RLWheelDir 0 "Stationary" 1 "Forward" 2 "Reverse" 3 "Unsupported" 4 "Fault"; VAL_ 880 ACCCruiseState 2 "Adaptive" 3 "Adaptive" 4 "Non-adaptive" 5 "Non-adaptive" ; VAL_ 880 ACCLeadCar 1 "Present" 0 "Not Present" ; VAL_ 880 ACCGapLevel 3 "Far" 2 "Med" 1 "Near" 0 "Inactive" ; From 3d1be8427a7e801e7da4e8506e5d5c2605de9176 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 6 Feb 2024 21:02:08 -0600 Subject: [PATCH 2/3] CAN packer/parser: clean up after alloc (#1007) * Update packer_pyx.pyx * this new also needs to be cleaned up --- can/packer_pyx.pyx | 4 ++++ can/parser_pyx.pyx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/can/packer_pyx.pyx b/can/packer_pyx.pyx index 5133fcc990..1b9fc8fab6 100644 --- a/can/packer_pyx.pyx +++ b/can/packer_pyx.pyx @@ -26,6 +26,10 @@ cdef class CANPacker: msg = self.dbc[0].msgs[i] self.name_to_address[string(msg.name)] = msg.address + def __dealloc__(self): + if self.packer: + del self.packer + cdef vector[uint8_t] pack(self, addr, values): cdef vector[SignalPackValue] values_thing values_thing.reserve(len(values)) diff --git a/can/parser_pyx.pyx b/can/parser_pyx.pyx index 808610e87a..8ce67740b0 100644 --- a/can/parser_pyx.pyx +++ b/can/parser_pyx.pyx @@ -66,6 +66,10 @@ cdef class CANParser: self.can = new cpp_CANParser(bus, dbc_name, message_v) self.update_strings([]) + def __dealloc__(self): + if self.can: + del self.can + def update_strings(self, strings, sendcan=False): for v in self.vl_all.values(): for l in v.values(): # no-cython-lint From 951ab07fdcbce023a5c927f56bbf94e0f2322366 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:08:34 -0500 Subject: [PATCH 3/3] VAG focusing on TCU (#947) Co-authored-by: rusefillc --- vw_golf_mk4.dbc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vw_golf_mk4.dbc b/vw_golf_mk4.dbc index 131a4b763c..6f14789135 100644 --- a/vw_golf_mk4.dbc +++ b/vw_golf_mk4.dbc @@ -1518,8 +1518,15 @@ CM_ SG_ 912 BSK_HD_Hauptraste "Status of trunk lid main detent"; CM_ SG_ 1088 Zaehler_Getriebe_1 "Counter Getriebe_1"; CM_ SG_ 1088 Waehlhebelposition__Getriebe_1_ "Gear Selector Position"; CM_ SG_ 1088 inneres_Soll_Motormoment "Desired Inner Torque"; +CM_ SG_ 1088 Gang_eingelegt "Gear Engaged"; CM_ SG_ 1088 Schaltabsicht "Shift Intent"; +CM_ SG_ 1088 Kuehlleistung "Cooling Power"; CM_ SG_ 1088 Wandlerverlustmoment "Converter Torque Loss"; +CM_ SG_ 1088 Getriebe_Notlauf "Transmission_Notlauf"; +CM_ SG_ 1088 Zielgang_oder_eingelegter_Gang "target_gear_or_gear_in_engagement"; +CM_ SG_ 1088 Uebertragungsfunktion "transfer function"; +CM_ SG_ 1088 EGS_Anforderung "EGS Requirement"; +CM_ SG_ 1088 Schaltung_aktiv__Getriebe_1_ "Shift Activity"; CM_ SG_ 1056 Fehlerstatus_Aussentemp__4_1 "ambient temp error"; CM_ SG_ 1056 Fehlerstatus_Oeltemperatur_4_1 "oil temp error";