Package frc.robot.subsystems
Class Climber
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.SubsystemBase
-
- frc.robot.subsystems.Climber
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class Climber extends edu.wpi.first.wpilibj2.command.SubsystemBaseRobot climber subsystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClimber.PositionSystem positions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description edu.wpi.cscore.VideoSourcegetCameraFeed()Get the climber camera feedstatic ClimbergetInstance()Get the instance of ClimberClimber.PositiongetPosition()Get the climber's current positionvoidhandleRetract(boolean isNew)Handle climber retractionvoidhandleService(boolean isNew)Handle service modevoidlock()Lock the climbervoidperiodic()voidservice()Go into service modevoidsetPosition(Climber.Position position)Set the desired position for the climber.voidunlock()Unlock the climber-
Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
-
-
-
-
Method Detail
-
getInstance
public static Climber getInstance()
Get the instance of Climber- Returns:
- Climber Instance
-
periodic
public void periodic()
-
handleRetract
public void handleRetract(boolean isNew)
Handle climber retraction- Parameters:
isNew-
-
handleService
public void handleService(boolean isNew)
Handle service mode- Parameters:
isNew- Is new state?
-
lock
public void lock()
Lock the climber
-
unlock
public void unlock()
Unlock the climber
-
service
public void service()
Go into service mode
-
setPosition
public void setPosition(Climber.Position position)
Set the desired position for the climber. "CURRENT" will hold it in place- Parameters:
position- Desired position
-
getPosition
public Climber.Position getPosition()
Get the climber's current position- Returns:
- Climber's position
-
getCameraFeed
public edu.wpi.cscore.VideoSource getCameraFeed()
Get the climber camera feed- Returns:
- Camera feed
-
-