Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
gin66 committed Jun 17, 2024
2 parents 490e293 + 92faa6a commit 5bbe879
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/FastAccelStepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ class FastAccelStepper {
void applySpeedAcceleration();

// ## Move commands
// ### move() and moveTo()
// start/move the stepper for (move) steps or to an absolute position.
//
// If the stepper is already running, then the current running move will be
Expand All @@ -472,6 +473,7 @@ class FastAccelStepper {
int8_t move(int32_t move, bool blocking = false);
int8_t moveTo(int32_t position, bool blocking = false);

// ### keepRunning()
// This command flags the stepper to keep run continuously into current
// direction. It can be stopped by stopMove.
// Be aware, if the motor is currently decelerating towards reversed
Expand All @@ -480,12 +482,14 @@ class FastAccelStepper {
void keepRunning();
bool isRunningContinuously() { return _rg.isRunningContinuously(); }

// This command just let the motor run continuously in one direction.
// ### runForward() and runBackwards()
// These commands just let the motor run continuously in one direction.
// If the motor is running in the opposite direction, it will reverse
// return value as with move/moveTo
int8_t runForward();
int8_t runBackward();

// ### forwardStep() and backwardStep()
// forwardStep()/backwardstep() can be called, while stepper is not moving
// If stepper is moving, this is a no-op.
// backwardStep() is a no-op, if no direction pin defined
Expand All @@ -494,6 +498,7 @@ class FastAccelStepper {
void forwardStep(bool blocking = false);
void backwardStep(bool blocking = false);

// ### moveByAcceleration()
// moveByAcceleration() can be called, if only the speed of the stepper
// is of interest and that speed to be controlled by acceleration.
// The maximum speed (in both directions) to be set by setSpeedInUs() before.
Expand All @@ -506,12 +511,14 @@ class FastAccelStepper {
// return value as with move/moveTo
int8_t moveByAcceleration(int32_t acceleration, bool allow_reverse = true);

// stop the running stepper with normal deceleration.
// ### stopMove()
// Stop the running stepper with normal deceleration.
// This only sets a flag and can be called from an interrupt !
void stopMove();
inline bool isStopping() { return _rg.isStopping(); }

// abruptly stop the running stepper without deceleration.
// ### forceStop()
// Abruptly stop the running stepper without deceleration.
// This can be called from an interrupt !
//
// The stepper command queue will be processed, but no further commands are
Expand All @@ -535,6 +542,7 @@ class FastAccelStepper {
// In keep running mode, the targetPos() is not updated
inline int32_t targetPos() { return _rg.targetPosition(); }

// ### Task planning
// The stepper task adds commands to the stepper queue until
// either at least two commands are planned, or the commands
// cover sufficient time into the future. Default value for that time is 20ms.
Expand Down

0 comments on commit 5bbe879

Please sign in to comment.