Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed automatic change from NMT BOOTING to NMT PRE-OPERATIONAL #402

Closed
Closed
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
7 changes: 2 additions & 5 deletions canopen/nmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ def on_heartbeat(self, can_id, data, timestamp):
logger.debug("Received heartbeat can-id %d, state is %d", can_id, new_state)
for callback in self._callbacks:
callback(new_state)
if new_state == 0:
# Boot-up, will go to PRE-OPERATIONAL automatically
self._state = 127
else:
self._state = new_state

self._state = new_state
self._state_received = new_state
self.state_update.notify_all()

Expand Down