OpenCyphal / libcanard

A compact implementation of the Cyphal/CAN protocol in C for high-integrity real-time embedded systems
http://opencyphal.org
MIT License
326 stars 192 forks source link

Fix multiframe CRC calculation #127

Closed vvg77ripe closed 5 years ago

vvg77ripe commented 5 years ago

I think you may never used new libcanard to receipt multiframes, because usually small devices don't need them. Multiframe transmission, such as node.GetInfo response, works correctly. Also i noticed that multiframe reception doesn't work with zero frame timestamps (because not_initialized check fails), but i don't know it is mandatory parameter or not.

vvg77ripe commented 5 years ago

Oops, I think i was little hurried and forgot to initialize CRC for next transfers. I hope this commit is more accurate.

pavel-kirienko commented 5 years ago

Also i noticed that multiframe reception doesn't work with zero frame timestamps (because not_initialized check fails), but i don't know it is mandatory parameter or not.

Yep, the timestamps are mandatory.

We really should have our unit/regression tests organized. Any help in resolving https://github.com/UAVCAN/libcanard/issues/102 would be appreciated.