Elevator

public class Elevator extends SubsystemBase

The ElevatorSubsystem class is a Singleton to control the elevator motors on the robot. The class sets the motor positions, gets the motor positions, stops the motors, and toggles the soft stop for the elevator motor.

Properties

Link copied to clipboard
public final static String ELEVATOR_STATE_KEY

Functions

Link copied to clipboard
public double getElevatorPosAvg()
Get the average position of the elevator motors
Link copied to clipboard
public double getElevatorPosValue(String motor)
Get the position of the elevator motor
Link copied to clipboard
public static Elevator getInstance()
Returns the Singleton instance of this ElevatorSubsystem.
Link copied to clipboard
Get the state of the elevator motor
Link copied to clipboard
public double getStateDouble()
Gets the state of the elevator motor as a double in terms of its height in the parameters file
Link copied to clipboard
public void initializeAlarms()
Link copied to clipboard
public void moveElevator(double velocity)
Move the elevator motor at a specific velocity
Link copied to clipboard
public void moveElevatorToLevel()
Move the elevator motor to a specific level
Link copied to clipboard
public void periodic()
Link copied to clipboard
public void resetEncoders()
Soft resets the encoders on the elevator motors
Link copied to clipboard
public void setElevatorPosition(double pos)
Sets the elevator motor to a specific position
public void setElevatorPosition(double left, double right)
Set the position of the left and right elevator motors
Link copied to clipboard
public void setState(ElevatorState currentState)
Sets the elevator state
Link copied to clipboard
public void stopMotors()
Stops the elevator motors
Link copied to clipboard
public void toggleSoftStop()
Toggles the soft stop for the elevator motor