From fb13648e3811ea5605ffc2adaf364ea198b046f9 Mon Sep 17 00:00:00 2001 From: Furtif Date: Fri, 23 Aug 2024 18:14:01 +0200 Subject: [PATCH 1/3] init extended address --- ecu.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ecu.py b/ecu.py index 2979152..8da4e74 100644 --- a/ecu.py +++ b/ecu.py @@ -1549,7 +1549,7 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): progress.setRange(0, len(project_can_addresses)) progress.setValue(0) - try_new = [] + # try_new = [] # Only scan available ecu addresses for addr in list(set(project_can_addresses)): @@ -1567,13 +1567,13 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): continue text = _("Scanning address: ") - text1 = _("Skipping CAN extended address (not supported yet)") - - if len(elm.dnat[addr]) > 3 and not options.simulation_mode: - print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]:<65} [{text1}]") - continue - else: - print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]}") + # text1 = _("Skipping CAN extended address (not supported yet)") + # + # if len(elm.dnat[addr]) > 3 and not options.simulation_mode: + # print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]:<65} [{text1}]") + # continue + # else: + print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]}") if not options.simulation_mode: options.elm.init_can() @@ -1586,7 +1586,7 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): if not options.simulation_mode: options.elm.close_protocol() - return try_new + # return try_new def scan_kwp(self, progress=None, label=None, vehiclefilter=None): if options.simulation_mode: From f13cf01c8a1665a770d35b87aab6e66c53bc8490 Mon Sep 17 00:00:00 2001 From: Furtif Date: Fri, 23 Aug 2024 18:40:42 +0200 Subject: [PATCH 2/3] set AscendingOrder to Ecu window names. --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index b8e9f3a..dcc2ec7 100644 --- a/main.py +++ b/main.py @@ -140,6 +140,7 @@ def init(self): self.list.model().setHeaderData(5, core.Qt.Horizontal, _('Soft')) self.list.model().setHeaderData(6, core.Qt.Horizontal, _('Version')) self.list.model().setHeaderData(7, core.Qt.Horizontal, _('Projets')) + self.list.sortByColumn(0, core.Qt.AscendingOrder) stored_ecus = {"Custom": []} custom_files = glob.glob("./json/*.json.targets") From 1f6a417c1851a5c2985290f6efb766a8c0e99b9b Mon Sep 17 00:00:00 2001 From: Furtif Date: Thu, 5 Sep 2024 18:08:46 +0200 Subject: [PATCH 3/3] remove code comment (old) for not trouble --- ecu.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ecu.py b/ecu.py index 8da4e74..31698dc 100644 --- a/ecu.py +++ b/ecu.py @@ -1549,8 +1549,6 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): progress.setRange(0, len(project_can_addresses)) progress.setValue(0) - # try_new = [] - # Only scan available ecu addresses for addr in list(set(project_can_addresses)): i += 1 @@ -1567,12 +1565,6 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): continue text = _("Scanning address: ") - # text1 = _("Skipping CAN extended address (not supported yet)") - # - # if len(elm.dnat[addr]) > 3 and not options.simulation_mode: - # print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]:<65} [{text1}]") - # continue - # else: print(f"{text + addr:<35} ECU: {self.ecu_database.addr_group_mapping[addr]}") if not options.simulation_mode: @@ -1586,7 +1578,6 @@ def scan(self, progress=None, label=None, vehiclefilter=None, canline=0): if not options.simulation_mode: options.elm.close_protocol() - # return try_new def scan_kwp(self, progress=None, label=None, vehiclefilter=None): if options.simulation_mode: