Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of R5_StepperDrive by
Revision 4:754c74beef20, committed 2016-03-25
- Comitter:
- j_j205
- Date:
- Fri Mar 25 19:50:38 2016 +0000
- Parent:
- 3:97bea13f40a9
- Commit message:
- 3/25/16 2:50 JJ
Changed in this revision
StepperDrive.cpp | Show annotated file Show diff for this revision Revisions of this file |
StepperDrive.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 97bea13f40a9 -r 754c74beef20 StepperDrive.cpp --- a/StepperDrive.cpp Tue Feb 23 23:36:09 2016 +0000 +++ b/StepperDrive.cpp Fri Mar 25 19:50:38 2016 +0000 @@ -145,4 +145,33 @@ bool StepperDrive::isMoveDone() { return moveComplete; +} + +// FUNCTION: +// void pauseMove() +// IN-PARAMETERS: +// None +// OUT-PARAMETERS: +// None +// DESCRIPTION: +// Stops current move. Saves remaining steps in leftStepsPause +// and rightStepsPause. +void StepperDrive::pauseMove(); +{ + /* need to implement*/ +} + +// FUNCTION: +// void resumeMove() +// IN-PARAMETERS: +// None +// OUT-PARAMETERS: +// None +// DESCRIPTION: +// Restores remaining steps from leftStepsPause +// and rightStepsPause to leftSteps and rightSteps. Resumes +// move. +void StepperDrive::resumeMove(); +{ + /* need to implement */ } \ No newline at end of file
diff -r 97bea13f40a9 -r 754c74beef20 StepperDrive.h --- a/StepperDrive.h Tue Feb 23 23:36:09 2016 +0000 +++ b/StepperDrive.h Fri Mar 25 19:50:38 2016 +0000 @@ -11,6 +11,8 @@ //(serisl &, stepPinLeft, dirPinLeft, invertLeft, stepPinRight, dirPinRight, invertRight, wheelCircum, wheelSepar, periodUs) int move(float distance, float angle); bool isMoveDone(); + void pauseMove(); + void resumeMove(); Serial &pc; int getRightSteps() { return rightSteps; } @@ -41,6 +43,8 @@ float rightStepsPC; float leftError; float rightError; + int leftStepsPause; // for holding steps left during pause + int rightStepsPause; // for holding steps right during pause }; #endif \ No newline at end of file