Package frc.robot.shoulder
Class Shoulder
java.lang.Object
frc.spectrumLib.mechanism.Mechanism
frc.robot.shoulder.Shoulder
- All Implemented Interfaces:
edu.wpi.first.networktables.NTSendable
,edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Subsystem
,SpectrumSubsystem
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class frc.spectrumLib.mechanism.Mechanism
Mechanism.Config, Mechanism.FollowerConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SpectrumCANcoder
protected SpectrumCANcoderConfig
protected Shoulder.ShoulderConfig
Fields inherited from class frc.spectrumLib.mechanism.Mechanism
followerMotors, motor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaboveDegrees
(DoubleSupplier degrees, DoubleSupplier tolerance) atDegrees
(DoubleSupplier degrees, DoubleSupplier tolerance) belowDegrees
(DoubleSupplier degrees, DoubleSupplier tolerance) double
checkMoveOverTop
(DoubleSupplier degrees) getIfReversedDegrees
(DoubleSupplier degrees) getOffsetRotations
(DoubleSupplier degrees) frc.robot.shoulder.Shoulder.ShoulderSim
getSim()
void
initSendable
(edu.wpi.first.networktables.NTSendableBuilder builder) edu.wpi.first.wpilibj2.command.Command
move
(DoubleSupplier degrees) edu.wpi.first.wpilibj2.command.Command
move
(DoubleSupplier shrinkDegrees, DoubleSupplier exDegrees) edu.wpi.first.wpilibj2.command.Command
moveToDegrees
(DoubleSupplier degrees) Move to the specified position.offsetPosition
(DoubleSupplier position) void
periodic()
edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command
Holds the position of the Shoulder.void
void
void
edu.wpi.first.wpilibj2.command.Command
slowMove
(DoubleSupplier degrees) edu.wpi.first.wpilibj2.command.Command
Methods inherited from class frc.spectrumLib.mechanism.Mechanism
aboveCurrent, abovePercentage, aboveRotations, aboveVelocityRPM, applyCurrentLimit, atCurrent, atPercentage, atRotations, atTargetPosition, atVelocityRPM, belowCurrent, belowPercentage, belowRotations, belowVelocityRPM, checkAvgCurrent, checkMaxCurrent, checkMinThresholdCurrent, coastMode, degreesToRotations, ensureBrakeMode, getCurrentCommandName, getFollowerMotors, getMotor, getName, getPositionDegrees, getPositionPercentage, getPositionRotations, getStatorCurrent, getTarget, getVelocityRPM, getVoltage, isAttached, moveToPercentage, moveToRotations, percentToRotations, rotationsToDegrees, rotationsToPercent, runCurrentLimits, runFocRotations, runningDefaultCommand, runPercentage, runStop, runTorqueCurrentFoc, runVelocity, runVelocityTcFocRpm, runVoltage, setBrakeMode, setCurrentLimits, setDynMMPositionFoc, setMMPosition, setMMPosition, setMMPositionFoc, setMMVelocityFOC, setMotorPosition, setPercentOutput, setTorqueCurrentFoc, setVelocity, setVelocityTCFOCrpm, setVelocityTorqueCurrentFOC, setVoltageOutput, stop, tareMotor, telemetryInit, toggleReverseSoftLimit, toggleSupplyCurrentLimit, toggleTorqueCurrentLimit, updateCurrent, updateVoltage
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.networktables.NTSendable
initSendable
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, startEnd, startRun
-
Field Details
-
config
-
canCoder
-
canCoderConfig
-
-
Constructor Details
-
Shoulder
-
-
Method Details
-
periodic
public void periodic() -
setupStates
public void setupStates() -
setupDefaultCommand
public void setupDefaultCommand() -
initSendable
public void initSendable(edu.wpi.first.networktables.NTSendableBuilder builder) - Specified by:
initSendable
in interfaceedu.wpi.first.networktables.NTSendable
- Overrides:
initSendable
in classMechanism
-
resetToIntialPos
public edu.wpi.first.wpilibj2.command.Command resetToIntialPos() -
belowDegrees
- Overrides:
belowDegrees
in classMechanism
-
aboveDegrees
- Overrides:
aboveDegrees
in classMechanism
-
atDegrees
-
zeroShoulderRoutine
public edu.wpi.first.wpilibj2.command.Command zeroShoulderRoutine() -
runHoldShoulder
public edu.wpi.first.wpilibj2.command.Command runHoldShoulder()Holds the position of the Shoulder. -
moveToDegrees
Description copied from class:Mechanism
Move to the specified position.- Overrides:
moveToDegrees
in classMechanism
- Parameters:
degrees
- position in degrees
-
checkMoveOverTop
-
move
public edu.wpi.first.wpilibj2.command.Command move(DoubleSupplier shrinkDegrees, DoubleSupplier exDegrees) -
slowMove
-
move
-
getIfReversedOffsetInRotations
-
getIfReversedDegrees
-
getOffsetRotations
-
offsetPosition
-
simulationPeriodic
public void simulationPeriodic()- Specified by:
simulationPeriodic
in interfaceedu.wpi.first.wpilibj2.command.Subsystem
- Overrides:
simulationPeriodic
in classMechanism
-
getSim
public frc.robot.shoulder.Shoulder.ShoulderSim getSim()
-