Package frc.robot.elbow
Class Elbow
java.lang.Object
frc.spectrumLib.mechanism.Mechanism
frc.robot.elbow.Elbow
- 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
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) doublecheckNegative(DoubleSupplier degrees) getIfReversedDegrees(DoubleSupplier degrees) getOffsetRotations(DoubleSupplier degrees) doublefrc.robot.elbow.Elbow.ElbowSimgetSim()edu.wpi.first.wpilibj2.command.CommandgroundMove(DoubleSupplier degrees) voidinitSendable(edu.wpi.first.networktables.NTSendableBuilder builder) edu.wpi.first.wpilibj2.command.Commandmove(DoubleSupplier degrees) edu.wpi.first.wpilibj2.command.Commandmove(DoubleSupplier shrinkDegrees, DoubleSupplier exDegrees) edu.wpi.first.wpilibj2.command.CommandmoveToDegrees(DoubleSupplier degrees) Move to the specified position.edu.wpi.first.wpilibj2.command.CommandmoveToMotorPosition(DoubleSupplier position) offsetPosition(DoubleSupplier position) voidperiodic()edu.wpi.first.wpilibj2.command.Commandedu.wpi.first.wpilibj2.command.CommandHolds the position of the Elbow.voidvoidvoidedu.wpi.first.wpilibj2.command.CommandslowMove(DoubleSupplier degrees) edu.wpi.first.wpilibj2.command.CommandMethods 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, updateVoltageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.networktables.NTSendable
initSendableMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, startEnd, startRun
-
Constructor Details
-
Elbow
-
-
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:
initSendablein interfaceedu.wpi.first.networktables.NTSendable- Overrides:
initSendablein classMechanism
-
resetToInitialPos
public edu.wpi.first.wpilibj2.command.Command resetToInitialPos() -
getPositionWithNegative
public double getPositionWithNegative() -
belowDegrees
- Overrides:
belowDegreesin classMechanism
-
aboveDegrees
- Overrides:
aboveDegreesin classMechanism
-
atDegrees
-
zeroElbowRoutine
public edu.wpi.first.wpilibj2.command.Command zeroElbowRoutine() -
runHoldElbow
public edu.wpi.first.wpilibj2.command.Command runHoldElbow()Holds the position of the Elbow. -
moveToDegrees
Description copied from class:MechanismMove to the specified position.- Overrides:
moveToDegreesin classMechanism- Parameters:
degrees- position in degrees
-
checkNegative
-
move
public edu.wpi.first.wpilibj2.command.Command move(DoubleSupplier shrinkDegrees, DoubleSupplier exDegrees) -
move
-
slowMove
-
groundMove
-
getIfReversedOffsetInRotations
-
getIfReversedDegrees
-
getOffsetRotations
-
moveToMotorPosition
-
offsetPosition
-
simulationPeriodic
public void simulationPeriodic()- Specified by:
simulationPeriodicin interfaceedu.wpi.first.wpilibj2.command.Subsystem- Overrides:
simulationPeriodicin classMechanism
-
getConfig
-
getSim
public frc.robot.elbow.Elbow.ElbowSim getSim()
-