Class LinearActuator

  • All Implemented Interfaces:
    crackers.kobots.parts.movement.Actuator

    
    public abstract class LinearActuator
     implements Actuator<LinearMovement>
                        

    A linear actuator that can be used to extend and retract a part of a machine. Movement is defined as a percentage of the total range of motion. Note that some actuators may not be able to move partially, so the actual movement may be rounded to fully extend or retract (e.g. a solenoid).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Number current
    • Constructor Summary

      Constructors 
      Constructor Description
      LinearActuator()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Boolean move(LinearMovement movement) Perform the Movement and return true if the movement was successful/completed.
      abstract Boolean extendTo(Integer percentage) Extend or retract the actuator to the given percentage of the total range of motion.
      • Methods inherited from class crackers.kobots.parts.movement.Actuator

        getCurrent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LinearActuator

        LinearActuator()
    • Method Detail

      • extendTo

         abstract Boolean extendTo(Integer percentage)

        Extend or retract the actuator to the given percentage of the total range of motion. Returns true if the target has been reached.