Package com.crossbotics.ftchelper.robot
Class Lift
- All Implemented Interfaces:
Subsystem
A lift (a slide that goes up and down) on one motor, with named heights and an optional bottom
switch. Heights are in encoder counts.
lift = add(Lift.slide("lift").bottomSwitch("lift_bottom")); // Robot.java
public static class Lift { // Tunables.java
public static double min = 0, max = 2600; // the safe range (hard stops)
public static double kP = 0.004, kI = 0, kD = 0.0002, kF = 0.05;
public static double down = 0, low = 900, high = 2400; // named heights: any names you like
}
Suggested buttons (operator): A = lowest height, X = the second one, Y = the highest, D-pad up/down = next height up/down, left stick Y = by hand (it holds where you let go).
A bottom switch makes the bottom always right: pressing it sets the height to 0. Until it has been pressed once, the lift only goes down, slowly. Docs: docs/modules/robot.md (section "Lift")
-
Method Summary
Methods inherited from class com.crossbotics.ftchelper.robot.MotorPositions
addTelemetry, goTo, hold, isAt, isAtTarget, manual, part, position, positions, reversed, stepDown, stepUp, stop, update
-
Method Details
-
slide
A lift on this motor.- Parameters:
motor- the motor's configuration name
-
bottomSwitch
A touch sensor at the bottom of the travel.- Parameters:
switchName- its configuration name
-