Package ftclib.motor
Class FtcServoActuator.Params
java.lang.Object
ftclib.motor.FtcServoActuator.Params
- Enclosing class:
- FtcServoActuator
This class contains all the parameters for creating the servo.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private String
private boolean
private String
private final TrcServo.Params
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetFollowerServo
(String name, boolean inverted) This methods sets the parameter of the follower servo.setLogicalPosRange
(double minPos, double maxPos) This method sets the logical position range of the servo in the range of 0.0 to 1.0.setMaxStepRate
(double maxStepRate) This method sets the maximum stepping rate of the servo.setPhysicalPosRange
(double minPos, double maxPos) This method sets the physical position range of the servo in real world physical unit.setPositionPresets
(double tolerance, double... posPresets) This method sets an array of preset positions for the servo actuator.setPrimaryServo
(String name, boolean inverted) This methods sets the parameters of the primary servo.toString()
This method returns the string format of the servoParams info.
-
Field Details
-
-
primaryServoInverted
private boolean primaryServoInverted -
followerServoName
-
followerServoInverted
private boolean followerServoInverted -
servoParams
-
-
Constructor Details
-
Params
public Params()
-
-
Method Details
-
toString
This method returns the string format of the servoParams info. -
setPrimaryServo
This methods sets the parameters of the primary servo.- Parameters:
name
- specifies the name of the servo.inverted
- specifies true if the servo is inverted, false otherwise.- Returns:
- this object for chaining.
-
setFollowerServo
This methods sets the parameter of the follower servo.- Parameters:
name
- specifies the name of the servo.inverted
- specifies true if the servo is inverted, false otherwise.- Returns:
- this object for chaining.
-
setPhysicalPosRange
This method sets the physical position range of the servo in real world physical unit.- Parameters:
minPos
- specifies the min physical position.maxPos
- specifies the max physical position.- Returns:
- this object for chaining.
-
setLogicalPosRange
This method sets the logical position range of the servo in the range of 0.0 to 1.0.- Parameters:
minPos
- specifies the min logical position.maxPos
- specifies the max logical position.- Returns:
- this object for chaining.
-
setMaxStepRate
This method sets the maximum stepping rate of the servo. This enables setPower to speed control the servo.- Parameters:
maxStepRate
- specifies the maximum stepping rate (physicalPos/sec).- Returns:
- this parameter object.
-
setPositionPresets
This method sets an array of preset positions for the servo actuator.- Parameters:
tolerance
- specifies the preset tolerance.posPresets
- specifies an array of preset positions in scaled unit.- Returns:
- this object for chaining.
-