Package frc.robot.subsystems
Class AlgaElevator
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.AlgaElevator
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class AlgaElevator extends edu.wpi.first.wpilibj2.command.SubsystemBase
Subsystem that controls the Alga Elevator position mechanism.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the position state of the Alga Elevator.Field Summary
FieldsModifier and TypeFieldDescriptionfinal edu.wpi.first.wpilibj2.command.button.TriggerTrigger that is active when the lower limit switch is pressed.final edu.wpi.first.wpilibj2.command.button.TriggerTrigger that is active when the upper limit switch is pressed.Method Summary
Modifier and TypeMethodDescriptionGets the current elevator state.static AlgaElevatorvoidperiodic()edu.wpi.first.wpilibj2.command.CommandToggles the elevator position between UP and DOWN states.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
Field Details
atUpperLimit
public final edu.wpi.first.wpilibj2.command.button.Trigger atUpperLimitTrigger that is active when the upper limit switch is pressed.atLowerLimit
public final edu.wpi.first.wpilibj2.command.button.Trigger atLowerLimitTrigger that is active when the lower limit switch is pressed.
Method Details
getInstance
togglePosition
public edu.wpi.first.wpilibj2.command.Command togglePosition()Toggles the elevator position between UP and DOWN states.- Returns:
- A command that toggles the elevator position.
getElevatorState
Gets the current elevator state.- Returns:
- The current elevator state.
periodic
public void periodic()