Skip to content

Commit

Permalink
Merge pull request #1209 from cedricp/ext_address
Browse files Browse the repository at this point in the history
init extended address
  • Loading branch information
Furtif authored Sep 5, 2024
2 parents d47ad59 + 1f6a417 commit 62b8984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 1 addition & 10 deletions ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -1567,13 +1565,7 @@ 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]}")
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 +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:
Expand Down
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 62b8984

Please sign in to comment.