Skip to content

Commit

Permalink
fix minor master node od issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpdx committed May 7, 2023
1 parent 9288169 commit ca15d1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions olaf/_internals/master_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, od: canopen.ObjectDictionary, bus: str):

self.node_status = {}
for i in range(0x01, 0x80):
if i == self._node.object_dictionary.node_id:
if i == self._od.node_id:
continue # skip itself
self.node_status[i] = (0xFF, time()) # 0xFF is a flag, not a CANopen standard

Expand All @@ -32,7 +32,7 @@ def _restart_network(self):
super()._restart_network()

for i in range(0x01, 0x80):
if i == self._node.object_dictionary.node_id:
if i == self._od.node_id:
continue # skip itself
self._network.subscribe(0x80 + i, self._on_emergency)
self._network.subscribe(0x700 + i, self._on_heartbeat)
Expand Down

0 comments on commit ca15d1a

Please sign in to comment.