Package com.crossbotics.ftchelper.robot
Class Positioner
java.lang.Object
com.crossbotics.ftchelper.robot.Module<Positioner>
com.crossbotics.ftchelper.robot.ServoPositions<Positioner>
com.crossbotics.ftchelper.robot.Positioner
- All Implemented Interfaces:
Subsystem
Any servo with named positions: a deploy servo, a fold-out pivot, a gate, a flag. No suggested
buttons: use it from
Controls.java or an action.
intakeDeploy = add(Positioner.servo("intake_deploy")); // Robot.java
public static class IntakeDeploy { // Tunables.java (servo 0 to 1)
public static double stowed = 0.0, deployed = 0.8;
}
robot.intakeDeploy.goTo("deployed"); // anywhere
For the simulator, give its servo and draw what it swings: .part("gobilda-2000-speed")
.looks(Shape.arm().atMm(...).sizeMm(...).angle("stowed", 95).angle("deployed", -10)). Parts that
ride on it (Shape.on(intakeDeploy)) fold with it.
Docs: docs/modules/robot.md (section "Positioner")
-
Method Summary
Modifier and TypeMethodDescriptionvoidnext()The next position, in the order written in Tunables.java (after the last comes the first).static PositionerA positioner on this servo.Methods inherited from class com.crossbotics.ftchelper.robot.ServoPositions
addTelemetry, goTo, isAt, isDone, part, positions, reversed, stop, update
-
Method Details
-
servo
A positioner on this servo. Its Tunables section is the name in CamelCase ("intake_deploy" ->IntakeDeploy).- Parameters:
servo- the servo's configuration name
-
next
public void next()The next position, in the order written in Tunables.java (after the last comes the first).
-