Class ElevatorSubsystem

java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
org.penguinempire.subsystems.ElevatorSubsystem
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, edu.wpi.first.wpilibj2.command.Subsystem

public class ElevatorSubsystem extends edu.wpi.first.wpilibj2.command.SubsystemBase
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    boolean
    hasReachedTarget(double tolerance)
     
    void
    moveElevator(boolean up)
    Moves the elevator up or down.
    void
     
    void
    setPosition(double position)
     
    void
    Stop the elevator immediately (open-loop = 0).

    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
  • Constructor Details

    • ElevatorSubsystem

      public ElevatorSubsystem()
  • Method Details

    • moveElevator

      public void moveElevator(boolean up)
      Moves the elevator up or down. This is open-loop: up uses "Elevator Speed", down uses "Elevator Down Speed". Since left motor is configured to follow the right motor, we set the right motor. The left motor will automatically match it.
    • stopElevator

      public void stopElevator()
      Stop the elevator immediately (open-loop = 0).
    • setPosition

      public void setPosition(double position)
    • getElevatorPosition

      public double getElevatorPosition()
    • hasReachedTarget

      public boolean hasReachedTarget(double tolerance)
    • periodic

      public void periodic()