From 54166f884c705cfb335346f88c1c8523606a335a Mon Sep 17 00:00:00 2001 From: shrlnm Date: Sat, 29 Apr 2023 09:29:26 +0300 Subject: [PATCH] fix for NAV addr problem. CLIP addr==57 but DDT addr==58 --- pyren3/mod_ddt_ecu.py | 6 +++++- pyren3/mod_scan_ecus.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyren3/mod_ddt_ecu.py b/pyren3/mod_ddt_ecu.py index be847ef..7b23265 100644 --- a/pyren3/mod_ddt_ecu.py +++ b/pyren3/mod_ddt_ecu.py @@ -287,7 +287,7 @@ class DDTECU(): hash = Address+DiagVersion+Supplier+Soft+Version - print('Address:"%s" DiagVersion:"%s" Supplier:"%s" Soft:"%s" Version:"%s"'%( Address, DiagVersion, Supplier, Soft, Version)) + print('Address="%s" DiagVersion="%s" Supplier="%s" Soft="%s" Version="%s"'%( Address, DiagVersion, Supplier, Soft, Version)) eculist = mod_ddt_utils.loadECUlist() @@ -1206,6 +1206,10 @@ def AutoIdents_distance( DiagVersion, Supplier, Soft, Version, ai ): def ecuSearch(vehTypeCode, Address, DiagVersion, Supplier, Soft, Version, el, interactive = True): + # fix address problem for Nav + if Address=='57': + Address='58' + if Address not in list(el.keys()): return [] diff --git a/pyren3/mod_scan_ecus.py b/pyren3/mod_scan_ecus.py index d0484de..29a2436 100755 --- a/pyren3/mod_scan_ecus.py +++ b/pyren3/mod_scan_ecus.py @@ -1102,7 +1102,7 @@ def findTCOM( addr, cmd, rsp, pl_id = False ): vehTypeCode = '' - if not pl_id: + if cmd!='' and rsp!='': #print found ecus for r in list(se.allecus.keys()): if se.allecus[r]['dst']!=addr: continue