Skip to content

Conversation

@racerep
Copy link
Contributor

@racerep racerep commented Oct 9, 2017

No description provided.

This adds error reset and other xx00h errors to the log list.
Clearing the active list once error reset is received still holds true but all errors are now logged.
Since error reset is logged, increment log list.
self.active.append(entry)
self.emcy_received.notify_all()

if code & 0xFFFF == 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that I made a mistake masking out the lower byte when I actually meant to mask out the higher byte as specified here for example (reset = 00xx). So I think it should be:

if code & 0xFF00 == 0:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Sorry, I did not check DS-301 error codes.

# Error reset
self.active = []
for callback in self.callbacks:
callback(None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking it may be better skip using None as a representation for reset and just use the same emcy object regardless if it is a reset or an actual error. Then you can get timestamp for the reset and so on. What do you think? Then the documentation would have to be changed slightly as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@christiansandberg christiansandberg self-assigned this Oct 9, 2017
@christiansandberg christiansandberg added this to the v0.6.0 milestone Oct 9, 2017
@christiansandberg christiansandberg merged commit 2fb1188 into canopen-python:master Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants