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 Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum representing the position state of the Alga Elevator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final edu.wpi.first.wpilibj2.command.button.Trigger
    Trigger that is active when the lower limit switch is pressed.
    final edu.wpi.first.wpilibj2.command.button.Trigger
    Trigger that is active when the upper limit switch is pressed.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the current elevator state.
     
    void
     
    edu.wpi.first.wpilibj2.command.Command
    Toggles the elevator position between UP and DOWN states.

    Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

    addChild, getName, getSubsystem, initSendable, setName, setSubsystem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 atUpperLimit
      Trigger that is active when the upper limit switch is pressed.
    • atLowerLimit

      public final edu.wpi.first.wpilibj2.command.button.Trigger atLowerLimit
      Trigger that is active when the lower limit switch is pressed.
  • Method Details

    • getInstance

      public static AlgaElevator 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

      public AlgaElevator.ElevatorState getElevatorState()
      Gets the current elevator state.
      Returns:
      The current elevator state.
    • periodic

      public void periodic()