@@ -29,12 +29,12 @@ def ids_sharing_same_pgn(id_x, pgn_x, id_y, pgn_y):
29
29
30
30
31
31
def join_frame_by_signal_start_bit (files ): # type: (typing.List[str]) -> canmatrix.CanMatrix
32
- target_db = next (iter (canmatrix .formats .loadp (files .pop (0 )).values ())) # type: canmatrix.CanMatrix
32
+ target_db = next (iter (canmatrix .formats .loadp (files .pop (0 )).values ()))
33
33
34
34
pgn_x , id_x = list_pgn (db = target_db )
35
35
36
36
for f in files :
37
- source_db = next (iter (canmatrix .formats .loadp (f ).values ())) # type: canmatrix.CanMatrix
37
+ source_db = next (iter (canmatrix .formats .loadp (f ).values ()))
38
38
pgn_y , id_y = list_pgn (db = source_db )
39
39
40
40
same_pgn = ids_sharing_same_pgn (id_x , pgn_x , id_y , pgn_y )
@@ -44,7 +44,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat
44
44
target_fr = target_db .frame_by_id (id_a )
45
45
source_fr = source_db .frame_by_id (id_b )
46
46
47
- signal_to_add = [] # type: typing.List[canmatrix.Signal]
47
+ signal_to_add = []
48
48
for sig_t in target_fr .signals :
49
49
for sig_s in source_fr .signals :
50
50
# print(sig.name)
@@ -58,7 +58,7 @@ def join_frame_by_signal_start_bit(files): # type: (typing.List[str]) -> canmat
58
58
59
59
def rename_frame_with_id (source_db ): # type: (canmatrix.CanMatrix) -> None
60
60
for frameSc in source_db .frames :
61
- _ , pgn , sa = frameSc .arbitration_id .j1939_tuple ()
61
+ _ , pgn , sa = frameSc .arbitration_id .j1939_tuple
62
62
63
63
extension = "__{pgn:#04X}_{sa:#02X}_{sa:03d}d" .format (pgn = pgn , sa = sa )
64
64
new_name = frameSc .name + extension
@@ -95,7 +95,7 @@ def join_frame_for_manufacturer(db, files): # type: (canmatrix.CanMatrix, typin
95
95
target_fr = db .frame_by_id (idx )
96
96
source_fr = source_db .frame_by_id (idy )
97
97
98
- _ , pgn , sa = target_fr .arbitration_id .j1939_tuple ()
98
+ _ , pgn , sa = target_fr .arbitration_id .j1939_tuple
99
99
if sa < 128 :
100
100
print ('less' , target_fr .name )
101
101
to_add = []
0 commit comments