Package frc.robot.Subsystems.Elevator
Class Elevator
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.Subsystems.Elevator.Elevator
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
- Direct Known Subclasses:
ElevatorRealIO,ElevatorSimIO
public abstract class Elevator
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanbooleanatTarget()booleanatTarget(Elevator.TargetState state) abstract booleanabstract doubleabstract booleanabstract edu.wpi.first.math.geometry.Rotation2dabstract edu.wpi.first.wpilibj2.command.Commandabstract edu.wpi.first.wpilibj2.command.Commandabstract edu.wpi.first.wpilibj2.command.Commandvoidperiodic()protected abstract voidrunEleMotionMagic(double setpoint) abstract doublerunElevator(double speed) abstract voidrunIntake(double speed) abstract voidrunShooter(double speed) abstract doublerunWrist(double speed) protected abstract voidrunWristMotionMagic(double setpoint) voidsetElevatorSetpoint(double setpoint) Sets the target setpoint for internal elevator PIDvoidsetState(Elevator.TargetState state) Sets the target state for the elevator and wrist.edu.wpi.first.wpilibj2.command.CommandsetStateCmd(Elevator.TargetState state) voidsetWristSetpoint(double setpoint) Sets the target setpoint for internal wrist PIDabstract voidabstract voidabstract voidMethods 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
-
instance
-
m_current_state
-
-
Constructor Details
-
Elevator
protected Elevator()
-
-
Method Details
-
setState
Sets the target state for the elevator and wrist.- Parameters:
state- The desired state.
-
setElevatorSetpoint
public void setElevatorSetpoint(double setpoint) Sets the target setpoint for internal elevator PID- Parameters:
setpoint- The setpoint in meters. 0 is the lowest elevator height.
-
setWristSetpoint
public void setWristSetpoint(double setpoint) Sets the target setpoint for internal wrist PID- Parameters:
setpoint- The setpoint in meters. 0 is the lowest elevator height.
-
setStateCmd
-
atTarget
public boolean atTarget() -
atTarget
-
runElevator
public abstract double runElevator(double speed) -
runWrist
public abstract double runWrist(double speed) -
runEleMotionMagic
protected abstract void runEleMotionMagic(double setpoint) -
runWristMotionMagic
protected abstract void runWristMotionMagic(double setpoint) -
stopElevator
public abstract void stopElevator() -
stopWrist
public abstract void stopWrist() -
runIntake
public abstract void runIntake(double speed) -
runShooter
public abstract void runShooter(double speed) -
getElevatorHeight
public abstract double getElevatorHeight() -
getWristAngle
public abstract edu.wpi.first.math.geometry.Rotation2d getWristAngle() -
intakeCoralCmd
public abstract edu.wpi.first.wpilibj2.command.Command intakeCoralCmd() -
intakeCoralSequence
public abstract edu.wpi.first.wpilibj2.command.Command intakeCoralSequence() -
intakeAlgaeCmd
public abstract edu.wpi.first.wpilibj2.command.Command intakeAlgaeCmd() -
zeroWrist
public abstract void zeroWrist() -
getCoralStored
public abstract boolean getCoralStored() -
getElevatorZeroed
public abstract boolean getElevatorZeroed() -
atSetpoint
public abstract boolean atSetpoint() -
periodic
public void periodic()
-