Help validating a Rust port of the Arduino AccelStepper library

I’m wanting to make an embedded system using Rust and couldn’t find a good way for driving stepper motors. So I thought I’d port the Arduino AccelStepper library to Rust.

I’ve done the vast majority of the port, but am coming up blank when it comes to checking I’ve copied across the math correctly. It doesn’t look like the original library contains any tests or documents the original equations used (even though they are referenced quite often).

Does anyone know how I can see why my port’s calculations differ from the original’s?

I made a couple hacks so the original AccelStepper library could be run on non-Arduino devices, then compared the two implementations using quickcheck. That hasn’t really helped figure out which part of my calculations (Driver::compute_new_speed()) differs from the AccelStepper version though…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.