Package trclib.motor
Class TrcMotor.ExternalSensors
java.lang.Object
trclib.motor.TrcMotor.ExternalSensors
- Enclosing class:
- TrcMotor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TrcEncoder
private boolean
private TrcDigitalInput
private boolean
private TrcDigitalInput
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetEncoder
(TrcEncoder encoder, boolean inverted) This method sets whether the actuator has an external encoder.setLowerLimitSwitch
(TrcDigitalInput limitSwitch, boolean inverted) This method sets the lower limit switch properties.setUpperLimitSwitch
(TrcDigitalInput limitSwitch, boolean inverted) This method sets the upper limit switch properties.toString()
This method returns the string format of the Params info.
-
Field Details
-
lowerLimitSwitch
-
lowerLimitSwitchInverted
private boolean lowerLimitSwitchInverted -
upperLimitSwitch
-
upperLimitSwitchInverted
private boolean upperLimitSwitchInverted -
encoder
-
encoderInverted
private boolean encoderInverted
-
-
Constructor Details
-
ExternalSensors
public ExternalSensors()
-
-
Method Details
-
setLowerLimitSwitch
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
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
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
This method returns the string format of the Params info.
-