You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we assume that adk.read() will always receive the entire contents of a single command. This is not guaranteed, it could receive half of a packet, and append the other half to the beginning of the next read operation.
If this fragmentation continues, it can corrupt a chain of packets indefinitely if they happen to alias against the USB receive buffer size.
We should treat USB input like any other serial input:
read into the buffer
manually checking for EOL characters
process any completed substring
memmove() the unused remaining buffer
The text was updated successfully, but these errors were encountered:
https://github.com/platypusllc/firmware/blob/master/firmware/firmware.ino#L283
Currently, we assume that
adk.read()
will always receive the entire contents of a single command. This is not guaranteed, it could receive half of a packet, and append the other half to the beginning of the next read operation.If this fragmentation continues, it can corrupt a chain of packets indefinitely if they happen to alias against the USB receive buffer size.
We should treat USB input like any other serial input:
memmove()
the unused remaining bufferThe text was updated successfully, but these errors were encountered: