Package crackers.kobots.parts.movement
Class ServoLinearActuator
-
- All Implemented Interfaces:
-
crackers.kobots.parts.movement.Actuator
public class ServoLinearActuator extends LinearActuator
A linear actuator that uses a servo to extend and retract. Due to rounding errors and whatever gearing is applied, the "step" size is basically however far the servo moves the actuator in one degree of rotation.
TODO add a delta to manage the rate of change
-
-
Field Summary
Fields Modifier and Type Field Description private final Integercurrentprivate final ServoDevicetheServoprivate final FloathomeDegreesprivate final FloatmaximumDegrees
-
Constructor Summary
Constructors Constructor Description ServoLinearActuator(ServoDevice theServo, Float homeDegrees, Float maximumDegrees)
-
Method Summary
Modifier and Type Method Description IntegergetCurrent()final ServoDevicegetTheServo()final FloatgetHomeDegrees()final FloatgetMaximumDegrees()BooleanextendTo(Integer percentage)Extend or retract the actuator to the given percentage of the total range of motion. -
-
Method Detail
-
getCurrent
Integer getCurrent()
-
getTheServo
final ServoDevice getTheServo()
-
getHomeDegrees
final Float getHomeDegrees()
-
getMaximumDegrees
final Float getMaximumDegrees()
-
-
-
-