Class IndexerSubsystem

java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.IndexerSubsystem
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, edu.wpi.first.wpilibj2.command.Subsystem

public class IndexerSubsystem extends edu.wpi.first.wpilibj2.command.SubsystemBase
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum of possible motors to control
  • Constructor Summary

    Constructors
    Constructor
    Description
    Indexer subsystem for everything indexer related
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the current angle of the indexer
    boolean
    Check if center limebreak is seeing something
    boolean
    Check if the indexer is at its goal
    boolean
     
    void
    moveIndexerToPos(double angle)
    Rotate the indexer to a certain position
    void
     
    void
    rotateAllWheelsPercent(double percent)
    Rotates all wheels with a percent value
    void
    rotateAllWheelsVolts(double volts)
    Rotate all indexer motors with a certain voltage
    void
    Rotate one of the motors with a percent value
    void
    rotateMotorVolts rotates one of the motors by setting the voltage applied to the motor

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

    • IndexerSubsystem

      public IndexerSubsystem()
      Indexer subsystem for everything indexer related
  • Method Details

    • rotateMotorVolts

      public void rotateMotorVolts(IndexerSubsystem.IndexerMotors motor, double volts)
      rotateMotorVolts rotates one of the motors by setting the voltage applied to the motor
      Parameters:
      motor - The target motor, can be TOP_WHEEL, BOTTOM_WHEELS, or INDEXER_POS
      volts - The target voltage.
    • rotateMotorPercent

      public void rotateMotorPercent(IndexerSubsystem.IndexerMotors motor, double percent)
      Rotate one of the motors with a percent value
      Parameters:
      motor - The target motor.
      percent - Percent of motor speed (0.0-1.0)
    • rotateAllWheelsPercent

      public void rotateAllWheelsPercent(double percent)
      Rotates all wheels with a percent value
      Parameters:
      percent - Percent of motor speed to rotate
    • rotateAllWheelsVolts

      public void rotateAllWheelsVolts(double volts)
      Rotate all indexer motors with a certain voltage
      Parameters:
      volts - Volts to rotate motor with
    • moveIndexerToPos

      public void moveIndexerToPos(double angle)
      Rotate the indexer to a certain position
      Parameters:
      angle - The target angle for the indexer
    • isIndexerRotated

      public boolean isIndexerRotated()
      Check if the indexer is at its goal
      Returns:
      If the indexer is at its goal
    • isCenter

      public boolean isCenter()
      Check if center limebreak is seeing something
      Returns:
      If the limebreak is seeing something
    • isUp

      public boolean isUp()
    • getIndexerAngle

      public double getIndexerAngle()
      Get the current angle of the indexer
      Returns:
      The current angle of the indexer
    • periodic

      public void periodic()