Skip to content

Commit

Permalink
init extended address
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Aug 23, 2024
1 parent 5a68df0 commit fb13648
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand All @@ -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()
Expand All @@ -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:
Expand Down

0 comments on commit fb13648

Please sign in to comment.