Skip to content

If PPM values greater than 2000, or less than 1000 are recieved, 0 is returned rather than 2000, or 1000 #11

@m-archibald

Description

@m-archibald

Im reading ppm from a crossfire nano rx using a rp 2040 on pin 12. It works great!
However, if signals shorter than 1000 or longer than 2000 are recieved, the board prints 0s to the serial from the example sketch. I can program around this in my code, but it would be beneficial if this was included in the library

proposed fix:
signals between 1000 and 2000 behave as before
if signals shorter than 950 are received: return 0, otherwise return 1000
if signals longer than 2050 are received, return 0, otherwise return 2000

that way if a ppm signal is received that is slightly out of spec, the library corrects for it instead of just returning 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions