Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions canopen/objectdictionary/eds.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,19 +496,19 @@ def export_record(var, eds):
def mandatory_indices(x):
return x in {0x1000, 0x1001, 0x1018}

def manufacturer_idices(x):
return x in range(0x2000, 0x6000)
def manufacturer_indices(x):
return 0x2000 <= x < 0x6000

def optional_indices(x):
return all((
x > 0x1001,
not mandatory_indices(x),
not manufacturer_idices(x),
not manufacturer_indices(x),
))

supported_mantatory_indices = list(filter(mandatory_indices, od))
supported_optional_indices = list(filter(optional_indices, od))
supported_manufacturer_indices = list(filter(manufacturer_idices, od))
supported_manufacturer_indices = list(filter(manufacturer_indices, od))

def add_list(section, list):
eds.add_section(section)
Expand Down