Package ftclib.motor

Class FtcMotorActuator

java.lang.Object
ftclib.motor.FtcMotorActuator

public class FtcMotorActuator extends Object
This class creates an FTC platform specific motor with the specified parameters.
  • Field Details

    • primaryMotor

      private final TrcMotor primaryMotor
  • Constructor Details

    • FtcMotorActuator

      public FtcMotorActuator(FtcMotorActuator.Params params)
      Constructor: Create an instance of the object.
      Parameters:
      params - specifies the motor parameters.
  • Method Details

    • getMotor

      public TrcMotor getMotor()
      This method returns the created primary motor.
      Returns:
      primary motor.
    • createMotor

      public TrcMotor createMotor(String name, FtcMotorActuator.MotorType motorType, TrcMotor.ExternalSensors sensors)
      This method creates a motor with the specified parameters and initializes it.
      Parameters:
      name - specifies the instance name of the motor.
      motorType - specifies the motor type.
      sensors - specifies external sensors, can be null if none.
      Returns:
      created motor.