OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
119 stars 106 forks source link

UAVCAN/serial RX timestamping bug #112

Closed pavel-kirienko closed 3 years ago

pavel-kirienko commented 4 years ago

By @JediJeremy https://forum.uavcan.org/t/alternative-transport-protocols/324/17?u=pavel.kirienko:

I’m thinking of the rare case when the frame start delimiter gets corrupted in transit… the frame should parse anyway (since one separator delimiter is enough, according to the implementation docs) but if the previous frame ended a while ago the timing could appear to be very skewed if the ‘most recent delimiter’ timestamp is used. (could actually appear to be ‘backwards in time’ long before the frame was sent!) That’s why I suggested the first header byte - it can’t go missing.