Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Sedani Firmware to handle Serial in a safer manner #10

Open
btdubs opened this issue Oct 21, 2018 · 1 comment
Open

Edit Sedani Firmware to handle Serial in a safer manner #10

btdubs opened this issue Oct 21, 2018 · 1 comment
Assignees
Labels

Comments

@btdubs
Copy link
Contributor

btdubs commented Oct 21, 2018

Currently the Sedani serial reading is handled unsafely and could potentially end up with lost data from serial. This may happen because we only check for the first '$' character, not that the whole message is there. Serial does not guarantee our whole message shows up at once.
This can safely happen with having an terminating character (like a ';' or newline) and then knowing you have a full command. This is the thing to definitely implement.

We may also want to update to a non-blocking method, where we read each character individually to a buffer, but this may be bad as we may be late reading the whole message while other code runs. This may be something to investigate usefulness.

A medium google search says see this link for code: http://forum.arduino.cc/index.php?topic=288234.0

@btdubs btdubs added the bug label Oct 21, 2018
@btdubs btdubs self-assigned this Dec 2, 2018
@btdubs
Copy link
Contributor Author

btdubs commented Jan 13, 2019

Make sure to change the IMU to use it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant