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)
ExtensionInterface
current
- Current in ampspublic void enableCurrentLimit()
public void enableCoastMode()
enableCoastMode
in class BaseExtension
public void enableBrakeMode()
enableBrakeMode
in class BaseExtension
public void disableCurrentLimit()
public void setOutput(double output)
public int getLengthTicks()
public double getLengthInches()
ExtensionInterface
public void enableExtensionPIDController()
ExtensionInterface
public void setPIDControllerSetpointInInches(double setpointInInches)
ExtensionInterface
public void initDefaultCommand()
initDefaultCommand
in interface ExtensionInterface
initDefaultCommand
in class BaseExtension
public boolean isReverseLimitPressed()
public boolean isForwardLimitPressed()
public void setQuadratureEncoder(double encoderValue)
ExtensionInterface
public void setMotionMagicSetpointInInches(double extensionSetpointInInches)
ExtensionInterface
public double getMotionMagicSetpoint()
getMotionMagicSetpoint
in class BaseExtension
public void updateArbitraryFeedForward()
public void warnifLimitHit()
warnifLimitHit
in class BaseExtension
public double getArbitraryFeedForwardAngleMultiplier()
getArbitraryFeedForwardAngleMultiplier
in class BaseExtension
public double getForwardSoftLimitInInches()
getForwardSoftLimitInInches
in class BaseExtension
public double getReverseSoftLimitInInches()
getReverseSoftLimitInInches
in class BaseExtension
public boolean getTimeout()
public void stop()
TunableSubsystem
public void moveByPercentOutput(double output)
TunableSubsystem
public void sendDataToDashboard()
public boolean getReverseLimitSwitchTripped()
getReverseLimitSwitchTripped
in class BaseExtension
public boolean getForwardLimitSwitchTripped()
getForwardLimitSwitchTripped
in class BaseExtension
public void resetLimitSwitch()
resetLimitSwitch
in class BaseExtension