Skip to content

Commit

Permalink
Making SdoArray iterator behave equal to ODArray and *Record
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinse committed May 14, 2024
1 parent b55ce5c commit 29514b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion canopen/sdo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __getitem__(self, subindex: Union[int, str]) -> "SdoVariable":
return SdoVariable(self.sdo_node, self.od[subindex])

def __iter__(self) -> Iterable[int]:
return iter(range(1, len(self) + 1))
return iter(self.od)

def __len__(self) -> int:
return self[0].raw
Expand Down

0 comments on commit 29514b6

Please sign in to comment.