diff --git a/canopen/nmt.py b/canopen/nmt.py index 98d8ea25..ff42fe1b 100644 --- a/canopen/nmt.py +++ b/canopen/nmt.py @@ -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()