File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ class Protocol(object):
127127
128128 # the TX_IDs of known ECUs
129129 TX_ID_ENGINE = None
130+ TX_ID_TRANSMISSION = None
130131
131132
132133 def __init__ (self , lines_0100 ):
@@ -253,12 +254,16 @@ def populate_ecu_map(self, messages):
253254
254255 # if any tx_ids are exact matches to the expected values, record them
255256 for m in messages :
257+ if m .tx_id is None :
258+ logger .debug ("parse_frame failed to extract TX_ID" )
259+ continue
260+
256261 if m .tx_id == self .TX_ID_ENGINE :
257262 self .ecu_map [m .tx_id ] = ECU .ENGINE
258263 found_engine = True
264+ elif m .tx_id == self .TX_ID_TRANSMISSION :
265+ self .ecu_map [m .tx_id ] = ECU .TRANSMISSION
259266 # TODO: program more of these when we figure out their constants
260- # elif m.tx_id == self.TX_ID_TRANSMISSION:
261- # self.ecu_map[m.tx_id] = ECU.TRANSMISSION
262267
263268 if not found_engine :
264269 # last resort solution, choose ECU with the most bits set
You can’t perform that action at this time.
0 commit comments