![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
3-26-2015 DSV
Fork of R5_StepperDrive by
Revision 5:f611950fdeba, committed 2016-03-26
- Comitter:
- Hellkite85
- Date:
- Sat Mar 26 05:08:55 2016 +0000
- Parent:
- 4:754c74beef20
- Commit message:
- 3-26-2016 DSV
Changed in this revision
StepperDrive.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 754c74beef20 -r f611950fdeba StepperDrive.cpp --- a/StepperDrive.cpp Fri Mar 25 19:50:38 2016 +0000 +++ b/StepperDrive.cpp Sat Mar 26 05:08:55 2016 +0000 @@ -156,9 +156,15 @@ // DESCRIPTION: // Stops current move. Saves remaining steps in leftStepsPause // and rightStepsPause. -void StepperDrive::pauseMove(); +void StepperDrive::pauseMove() { - /* need to implement*/ + leftStepsPause = leftSteps; + rightStepsPause = rightSteps; + + leftSteps = 0; + rightSteps = 0; + + moveComplete = true; } // FUNCTION: @@ -171,7 +177,13 @@ // Restores remaining steps from leftStepsPause // and rightStepsPause to leftSteps and rightSteps. Resumes // move. -void StepperDrive::resumeMove(); +void StepperDrive::resumeMove() { - /* need to implement */ + leftSteps = leftStepsPause; + rightSteps = rightStepsPause; + + leftStepsPause = 0; + rightStepsPause = 0; + + moveComplete = false; } \ No newline at end of file