Skip to content

Mailbox checking #5

@anfroholic

Description

@anfroholic

while r is None:

Having played with this there's a lot of time waiting for the timeout and handling the exception. And while I don't think we want code like this in general it seems like checking the mailbox first and then attempting to receive is better.

Something more like:

while True:
    if(can.any(0)):
        break
can.receive(0)

again, I don't believe we want blocking code like this and moreover we want to use the can.rxcallback() function so we can see if we've missed any messages. At which point we would throw a fault or something, I've got an idea on how this could be handled but it's for a future discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions