Package trclib.motor

Class TrcMotor.ExternalSensors

java.lang.Object
trclib.motor.TrcMotor.ExternalSensors
Enclosing class:
TrcMotor

public static class TrcMotor.ExternalSensors extends Object
  • Field Details

    • lowerLimitSwitch

      private TrcDigitalInput lowerLimitSwitch
    • lowerLimitSwitchInverted

      private boolean lowerLimitSwitchInverted
    • upperLimitSwitch

      private TrcDigitalInput upperLimitSwitch
    • upperLimitSwitchInverted

      private boolean upperLimitSwitchInverted
    • encoder

      private TrcEncoder encoder
    • encoderInverted

      private boolean encoderInverted
  • Constructor Details

    • ExternalSensors

      public ExternalSensors()
  • Method Details

    • setLowerLimitSwitch

      public TrcMotor.ExternalSensors setLowerLimitSwitch(TrcDigitalInput limitSwitch, boolean inverted)
      This method sets the lower limit switch properties.
      Parameters:
      limitSwitch - specifies the lower limit switch object if there is one, null otherwise.
      inverted - specifies true if the limit switch is normally open, false if normally close.
      Returns:
      this object for chaining.
    • setUpperLimitSwitch

      public TrcMotor.ExternalSensors setUpperLimitSwitch(TrcDigitalInput limitSwitch, boolean inverted)
      This method sets the upper limit switch properties.
      Parameters:
      limitSwitch - specifies the upper limit switch object if there is one, null otherwise.
      inverted - specifies true if the limit switch is normally open, false if normally close.
      Returns:
      this object for chaining.
    • setEncoder

      public TrcMotor.ExternalSensors setEncoder(TrcEncoder encoder, boolean inverted)
      This method sets whether the actuator has an external encoder.
      Parameters:
      encoder - specifies the external encoder if there is one, null otherwise.
      inverted - specifies true if the encoder is inverted, false otherwise.
      Returns:
      this object for chaining.
    • toString

      public String toString()
      This method returns the string format of the Params info.
      Overrides:
      toString in class Object
      Returns:
      string format of the params info.