Skip to content

Commit

Permalink
Merge pull request #26 from Laerdal/fix-add-pdo-parameter-bug
Browse files Browse the repository at this point in the history
Fix issue with adding PDO parameter #25
  • Loading branch information
sveinse authored May 22, 2024
2 parents d2cb865 + 43e6711 commit ede38d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/objdictgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from objdictgen.node import Node
from objdictgen.nodemanager import NodeManager

__version__ = "3.4"
__version__ = "3.5a1"

# Shortcuts
LoadFile = Node.LoadFile
Expand Down
10 changes: 7 additions & 3 deletions src/objdictgen/nodemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,13 @@ def ManageEntriesOfCurrent(self, addinglist: list[int], removinglist: list[int],
node.AddEntry(index, 1, default)
# Second case entry is a record
else:
# FIXME: How to retrieve the number of subentries?
for i in range(1, node.GetSubentryLength(index) + 1):
subentry_infos = node.GetSubentryInfos(index, i)
i = 0
while True:
try:
i += 1
subentry_infos = node.GetSubentryInfos(index, i)
except ValueError:
break
if "default" in subentry_infos:
default = subentry_infos["default"]
else:
Expand Down

0 comments on commit ede38d1

Please sign in to comment.