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.SubsystemBase
Robot climber subsystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Climber.Position
System positions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description edu.wpi.cscore.VideoSource
getCameraFeed()
Get the climber camera feedstatic Climber
getInstance()
Get the instance of ClimberClimber.Position
getPosition()
Get the climber's current positionvoid
handleRetract(boolean isNew)
Handle climber retractionvoid
handleService(boolean isNew)
Handle service modevoid
lock()
Lock the climbervoid
periodic()
void
service()
Go into service modevoid
setPosition(Climber.Position position)
Set the desired position for the climber.void
unlock()
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
-
-