Class AsyncStepper
-
- All Implemented Interfaces:
-
crackers.kobots.parts.movement.async.AsyncActuator
public class AsyncStepper implements AsyncActuator
Wraps up a stepper motor for asynchronous movement handling. This utilizes "step-counting" to do the actual movements.
The stepPause parameter is provided to introduce a delay between steps to prevent overdriving the stepper motor or driver circuits (e.g. "slow" response from the hardware).
NOTE The stepper is not automatically released after movement; it is assumed that holding torque is desired.
-
-
Constructor Summary
Constructors Constructor Description AsyncStepper(BasicStepperMotor theStepper, BasicStepperController.StepStyle stepStyle, Duration stepPause)
-
Method Summary
Modifier and Type Method Description IntegergetCurrent()Return some notion of the "current" position/value of the actuator. final BasicStepperController.StepStylegetStepStyle()final <Error class: unknown class>moveSteps(Integer steps, Duration elapsedTime, Function1<Float, Float> easingFunction)<Error class: unknown class>softLanding(Integer target, Duration time)<Error class: unknown class>softLaunch(Integer target, Duration time)<Error class: unknown class>smoothMove(Integer target, Duration time)Unitrelease()Release the stepper motor, allowing it to be turned freely. -
-
Constructor Detail
-
AsyncStepper
AsyncStepper(BasicStepperMotor theStepper, BasicStepperController.StepStyle stepStyle, Duration stepPause)
- Parameters:
theStepper- The underlying stepper motor to control.stepStyle- The stepping style to use (default: BasicStepperController.StepStyle.SINGLE).stepPause- The pause duration between steps (default:Duration.ZERO).
-
-
Method Detail
-
getCurrent
Integer getCurrent()
Return some notion of the "current" position/value of the actuator.
-
getStepStyle
final BasicStepperController.StepStyle getStepStyle()
-
moveSteps
final <Error class: unknown class> moveSteps(Integer steps, Duration elapsedTime, Function1<Float, Float> easingFunction)
-
softLanding
<Error class: unknown class> softLanding(Integer target, Duration time)
-
softLaunch
<Error class: unknown class> softLaunch(Integer target, Duration time)
-
smoothMove
<Error class: unknown class> smoothMove(Integer target, Duration time)
-
-
-
-