public class Extension extends BaseExtension
| Modifier and Type | Field and Description |
|---|---|
static double |
ARBITRARY_FEEDFORWARD_CONSTANT |
static int |
EXTENSION_IN_POS |
static double |
EXTENSION_OUT_IN_INCHES |
static int |
EXTENSION_OUT_POS |
static double |
FIXED_LENGTH |
static int |
FORWARD_SOFT_LIMIT |
static double |
MAX_EXTENSION_OUTPUT |
static double |
MOTOR_ROTATIONS_PER_INCH |
static int |
QUAD_ENCODER_MAX |
static int |
QUAD_ENCODER_MIN |
static int |
REVERSE_SOFT_LIMIT |
static double |
TICKS_PER_MOTOR_ROTATION |
| Constructor and Description |
|---|
Extension() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableCurrentLimit() |
void |
enableBrakeMode() |
void |
enableCoastMode() |
void |
enableCurrentLimit() |
void |
enableExtensionPIDController()
Enables the PID Controller for extension
|
double |
getArbitraryFeedForwardAngleMultiplier() |
boolean |
getForwardLimitSwitchTripped() |
double |
getForwardSoftLimitInInches() |
double |
getLengthInches()
Gets the current Extension length in absolute ticks with 0 at no extension.
|
int |
getLengthTicks() |
double |
getMotionMagicSetpoint() |
boolean |
getReverseLimitSwitchTripped() |
double |
getReverseSoftLimitInInches() |
boolean |
getTimeout() |
void |
initDefaultCommand() |
boolean |
isForwardLimitPressed() |
boolean |
isReverseLimitPressed() |
void |
moveByPercentOutput(double output)
Moves the Subsystem using percent outpu
|
void |
resetLimitSwitch() |
void |
sendDataToDashboard() |
void |
setCurrentLimit(int current)
Sets the peak current limit for the elbow motor.
|
void |
setMotionMagicSetpointInInches(double extensionSetpointInInches)
Setup for movement and Motion Magic
|
void |
setOutput(double output) |
void |
setPIDControllerSetpointInInches(double setpointInInches)
Modifies the setpoint for the PID Controller
|
void |
setQuadratureEncoder(double encoderValue)
Sets the SensorCollection encoder value to encoderValue (use this to reset the encoder when at a known position)
|
void |
stop()
Enables percent output to shut off other movement of the Subsystem (note this means it will stop holding itself up).
|
void |
updateArbitraryFeedForward()
Updates the arbitrary feed forward on this subsystem
|
void |
warnifLimitHit() |
public static final double TICKS_PER_MOTOR_ROTATION
public static final double MOTOR_ROTATIONS_PER_INCH
public static final int EXTENSION_IN_POS
public static final int EXTENSION_OUT_POS
public static final double EXTENSION_OUT_IN_INCHES
public static final double FIXED_LENGTH
public static final int FORWARD_SOFT_LIMIT
public static final int REVERSE_SOFT_LIMIT
public static final int QUAD_ENCODER_MAX
public static final int QUAD_ENCODER_MIN
public static final double ARBITRARY_FEEDFORWARD_CONSTANT
public static final double MAX_EXTENSION_OUTPUT
public void setCurrentLimit(int current)
ExtensionInterfacecurrent - Current in ampspublic void enableCurrentLimit()
public void enableCoastMode()
enableCoastMode in class BaseExtensionpublic void enableBrakeMode()
enableBrakeMode in class BaseExtensionpublic void disableCurrentLimit()
public void setOutput(double output)
public int getLengthTicks()
public double getLengthInches()
ExtensionInterfacepublic void enableExtensionPIDController()
ExtensionInterfacepublic void setPIDControllerSetpointInInches(double setpointInInches)
ExtensionInterfacepublic void initDefaultCommand()
initDefaultCommand in interface ExtensionInterfaceinitDefaultCommand in class BaseExtensionpublic boolean isReverseLimitPressed()
public boolean isForwardLimitPressed()
public void setQuadratureEncoder(double encoderValue)
ExtensionInterfacepublic void setMotionMagicSetpointInInches(double extensionSetpointInInches)
ExtensionInterfacepublic double getMotionMagicSetpoint()
getMotionMagicSetpoint in class BaseExtensionpublic void updateArbitraryFeedForward()
public void warnifLimitHit()
warnifLimitHit in class BaseExtensionpublic double getArbitraryFeedForwardAngleMultiplier()
getArbitraryFeedForwardAngleMultiplier in class BaseExtensionpublic double getForwardSoftLimitInInches()
getForwardSoftLimitInInches in class BaseExtensionpublic double getReverseSoftLimitInInches()
getReverseSoftLimitInInches in class BaseExtensionpublic boolean getTimeout()
public void stop()
TunableSubsystempublic void moveByPercentOutput(double output)
TunableSubsystempublic void sendDataToDashboard()
public boolean getReverseLimitSwitchTripped()
getReverseLimitSwitchTripped in class BaseExtensionpublic boolean getForwardLimitSwitchTripped()
getForwardLimitSwitchTripped in class BaseExtensionpublic void resetLimitSwitch()
resetLimitSwitch in class BaseExtension