CheapStepper icon indicating copy to clipboard operation
CheapStepper copied to clipboard

CheapStepper::move/newMove - numSteps should the long instead of int

Open matonym opened this issue 9 years ago • 1 comments

At the moment CheapStepper::move has a parameter with the number of steps you want to step the motor. The numSteps parameter is defined as an int which only give you room to turn it maximum about 8 full revolutions. If this was defined as a Long instead we would have a lot of more possibilities.

These are the changes needed to be done: CheapStepper.cpp Row 49: void CheapStepper::move (bool clockwise, long numSteps) Row 91: void CheapStepper::newMove (bool clockwise, long numSteps){

CheapStepper.h Row 45: void move (bool clockwise, long numSteps); Row 63: void newMove (bool clockwise, long numSteps); Row 95: long getStepsLeft() Row 124: long stepsLeft = 0

This may affect the other functions as well, but I haven't tested those.

matonym avatar Jan 17 '17 08:01 matonym

Thanks for noting this oversight.

I've updated the source to use unsigned long for the number of steps on branch long-steps. If you have a chance could you test it to make sure it's working properly (>8 revs).

I'll try to test soon myself. then I'll merge to master with 0.2.1 tag

tyhenry avatar Feb 02 '17 19:02 tyhenry