public interface CANSpeedController extends SpeedController, PIDInterface, LiveWindowSendable
Modifier and Type | Interface and Description |
---|---|
static interface |
CANSpeedController.ControlMode
Mode determines how the motor is controlled, used internally.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SMART_DASHBOARD_TYPE
All CAN Speed Controllers have the same SmartDashboard type: "CANSpeedController".
|
Modifier and Type | Method and Description |
---|---|
default ITableListener |
createTableListener()
Creates an ITableListener for the LiveWindow table for this CAN speed controller.
|
double |
getBusVoltage()
Get the current input (battery) voltage.
|
CANSpeedController.ControlMode |
getControlMode()
Gets the current control mode.
|
default double |
getF()
Gets the feed-forward PID constant.
|
double |
getOutputCurrent()
Get the current being applied to the motor.
|
double |
getOutputVoltage()
Get the current output voltage.
|
double |
getPosition()
Return the current position of whatever the current selected sensor is.
|
default java.lang.String |
getSmartDashboardType()
The string representation of the named data type that will be used by the smart dashboard for
this
Sendable . |
double |
getSpeed()
Return the current velocity of whatever the current selected sensor is.
|
double |
getTemperature()
Get the current temperature of the controller.
|
void |
setControlMode(int mode)
Sets the control mode of this speed controller.
|
void |
setD(double d)
Set the derivative PID constant.
|
default void |
setF(double f)
Set the feed-forward PID constant.
|
void |
setI(double i)
Set the integral PID constant.
|
void |
setP(double p)
Set the proportional PID constant.
|
void |
setVoltageRampRate(double rampRate)
Set the maximum rate of change of the output voltage.
|
default void |
updateTable()
Update the table for this sendable object with the latest values.
|
disable, get, getInverted, set, setInverted, stopMotor
disable, enable, getD, getError, getI, getP, getSetpoint, isEnabled, reset, setPID, setSetpoint
startLiveWindowMode, stopLiveWindowMode
static final java.lang.String SMART_DASHBOARD_TYPE
CANSpeedController.ControlMode getControlMode()
void setControlMode(int mode)
mode
- the the new modevoid setP(double p)
void setI(double i)
void setD(double d)
default void setF(double f)
default double getF()
double getBusVoltage()
double getOutputVoltage()
double getOutputCurrent()
double getTemperature()
double getPosition()
See specific implementations for more information on selecting feedback sensors.
double getSpeed()
See specific implementations for more information on selecting feedback sensors.
void setVoltageRampRate(double rampRate)
rampRate
- the maximum rate of change of the votlage, in Volts / sec.default void updateTable()
LiveWindowSendable
updateTable
in interface LiveWindowSendable
default java.lang.String getSmartDashboardType()
Sendable
Sendable
.getSmartDashboardType
in interface Sendable
Sendable
.default ITableListener createTableListener()