Package frc.robot.subsystems
Class Climber
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Climber
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the position of the left climb motor.double
Get the position of the right climb motor.double
Get the velocity of the left climb motor.double
Get the velocity of the ramp pivot motor.double
Get the velocity of the right climb motor.void
periodic()
void
setSpeed
(double leftSpeed, double rightSpeed) sets the speeds of the climb motorsvoid
setSpeedLeft
(double leftSpeed) Set the velocity of the left climb motor.void
setSpeedRampPivot
(double rampPivotSpeed) Set the velocity of the ramp pivot motor.void
setSpeedRight
(double rightSpeed) Set the velocity of the right climb 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, startRun
-
Constructor Details
-
Climber
public Climber()Creates a new Climber.
-
-
Method Details
-
setSpeed
public void setSpeed(double leftSpeed, double rightSpeed) sets the speeds of the climb motors- Parameters:
leftSpeed
- The speed to set. Value should be between -1.0 and 1.0.rightSpeed
- The speed to set. Value should be between -1.0 and 1.0.
-
getSpeedRight
public double getSpeedRight()Get the velocity of the right climb motor.- Returns:
- Number the RPM of the motor
-
getSpeedLeft
public double getSpeedLeft()Get the velocity of the left climb motor.- Returns:
- Number the RPM of the motor
-
getSpeedRampPivot
public double getSpeedRampPivot()Get the velocity of the ramp pivot motor.- Returns:
- Number the RPM of the motor
-
setSpeedLeft
public void setSpeedLeft(double leftSpeed) Set the velocity of the left climb motor.- Parameters:
leftSpeed
- The speed to set. Value should be between -1.0 and 1.0.
-
setSpeedRight
public void setSpeedRight(double rightSpeed) Set the velocity of the right climb motor.- Parameters:
rightSpeed
- The speed to set. Value should be between -1.0 and 1.0.
-
setSpeedRampPivot
public void setSpeedRampPivot(double rampPivotSpeed) Set the velocity of the ramp pivot motor.- Parameters:
rampPivotSpeed
- The speed to set. Value should be between -1.0 and 1.0.
-
getPositionRightMotor
public double getPositionRightMotor()Get the position of the right climb motor. This returns the native units of 'rotations' by default- Returns:
- Number of rotations of the motor
-
getPositionLeftMotor
public double getPositionLeftMotor()Get the position of the left climb motor. This returns the native units of 'rotations'- Returns:
- Number of rotations of the motor
-
periodic
public void periodic()
-