ethercrab-rs / ethercrab

EtherCAT master written in pure Rust
258 stars 25 forks source link

Fix overflowing subtraction when calculating DC cycle offset #229

Closed jamwaffles closed 3 months ago

jamwaffles commented 3 months ago

This was originally fixed by @jabratn in this commit on their fork. I hope you don't mind me taking the fix! I've added the Co-Authored-By header to give due credit.

Tested on my EK1100 setup which panics on overflow when on master, but doesn't on this branch (but still calculates the offset correctly).