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…