Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

Protect against messages being read out of sync #9

Open
DanNixon opened this issue Oct 4, 2015 · 1 comment
Open

Protect against messages being read out of sync #9

DanNixon opened this issue Oct 4, 2015 · 1 comment
Labels

Comments

@DanNixon
Copy link
Owner

DanNixon commented Oct 4, 2015

Currently it is possible doe to serial bus issues that messages may start being read out of sync (i.e. FF 66 01 FF FF which should be 66 01 FF FF FF).

Anything the reads from the serial port directly should instead read through poll() which will look for the required header and read ahead to the end of message marker (FF FF FF), since all the serial reading will be done in a single buffer this should eliminate this issue.

(of course the first message to fail will still fail, but subsequent messages should not)

@DanNixon DanNixon added the bug label Oct 4, 2015
@DanNixon DanNixon self-assigned this Oct 4, 2015
DanNixon added a commit that referenced this issue Oct 5, 2015
@DanNixon
Copy link
Owner Author

The code in the mentioned branch now works on the Teensy (the platform I first noticed this issue) but broke support on Arduino.

@DanNixon DanNixon removed their assignment Oct 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant