Skip to content

Commit

Permalink
Fix issue with adding PDO parameter #25
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinse committed May 21, 2024
1 parent d2cb865 commit 8049bd6
Showing 1 changed file with 7 additions and 3 deletions.
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 8049bd6

Please sign in to comment.