Class Positioner

All Implemented Interfaces:
Subsystem

public final class Positioner extends ServoPositions<Positioner>
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 Details

    • servo

      public static Positioner servo(String 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).