|
| WPI_CANCoder (int deviceNumber, std::string const &canbus="") |
| Construtor for CANCoder. More...
|
|
| ~WPI_CANCoder () |
|
| WPI_CANCoder ()=delete |
|
| WPI_CANCoder (WPI_CANCoder const &)=delete |
|
WPI_CANCoder & | operator= (WPI_CANCoder const &)=delete |
|
void | InitSendable (wpi::SendableBuilder &builder) override |
|
| CANCoder (int deviceNumber, std::string const &canbus="") |
| Constructor. More...
|
|
| ~CANCoder () |
|
double | GetPosition () |
| Gets the position of the sensor. More...
|
|
double | GetVelocity () |
| Sets the position of the sensor. More...
|
|
ErrorCode | SetPosition (double newPosition, int timeoutMs=0) |
| Sets the position of the sensor. More...
|
|
ErrorCode | SetPositionToAbsolute (int timeoutMs=0) |
| Sets the position of the sensor to match the magnet's "Absolute Sensor". More...
|
|
double | GetAbsolutePosition () |
| Gets the absolute position of the sensor. More...
|
|
ErrorCode | ConfigVelocityMeasurementPeriod (SensorVelocityMeasPeriod period, int timeoutMs=0) |
| Configures the period of each velocity sample. More...
|
|
ErrorCode | ConfigVelocityMeasurementWindow (int windowSize, int timeoutMs=0) |
| Sets the number of velocity samples used in the rolling average velocity measurement. More...
|
|
ErrorCode | ConfigAbsoluteSensorRange (ctre::phoenix::sensors::AbsoluteSensorRange absoluteSensorRange, int timeoutMs=0) |
| Sets the signage and range of the "Absolute Position" signal. More...
|
|
ErrorCode | ConfigMagnetOffset (double offsetDegrees, int timeoutMs=0) |
| Adjusts the zero point for the absolute position register. More...
|
|
ErrorCode | ConfigSensorInitializationStrategy (ctre::phoenix::sensors::SensorInitializationStrategy initializationStrategy, int timeoutMs=0) |
| Pick the strategy on how to initialize the CANCoder's "Position" register. More...
|
|
ErrorCode | ConfigFeedbackCoefficient (double sensorCoefficient, const std::string &unitString, ctre::phoenix::sensors::SensorTimeBase sensortimeBase, int timeoutMs=0) |
| Choose what units you want the API to get/set. More...
|
|
double | GetBusVoltage () |
| Gets the bus voltage seen by the device. More...
|
|
ctre::phoenix::sensors::MagnetFieldStrength | GetMagnetFieldStrength () |
| Gets the magnet's health. More...
|
|
ErrorCode | ConfigSensorDirection (bool bSensorDirection, int timeoutMs=0) |
| Choose which direction is interpreted as positive displacement. More...
|
|
ErrorCode | GetLastError () |
| Call GetLastError() generated by this object. More...
|
|
std::string | GetLastUnitString () |
| Get the units for the signal retrieved in the last called get routine. More...
|
|
double | GetLastTimestamp () |
| Get the timestamp of the CAN frame retrieved in the last called get routine. More...
|
|
ErrorCode | ConfigSetCustomParam (int newValue, int paramIndex, int timeoutMs=0) |
| Sets the value of a custom parameter. More...
|
|
int | ConfigGetCustomParam (int paramIndex, int timeoutMs=0) |
| Gets the value of a custom parameter. More...
|
|
ErrorCode | ConfigSetParameter (ParamEnum param, double value, uint8_t subValue, int ordinal, int timeoutMs=0) |
| Sets a parameter. More...
|
|
double | ConfigGetParameter (ParamEnum param, int ordinal, int timeoutMs=0) |
| Gets a parameter. More...
|
|
ErrorCode | ConfigGetParameter (ParamEnum param, int32_t valueToSend, int32_t &valueReceived, uint8_t &subValue, int32_t ordinal, int32_t timeoutMs) |
| Gets a parameter by passing an int by reference. More...
|
|
ErrorCode | SetStatusFramePeriod (CANCoderStatusFrame statusFrame, uint8_t periodMs, int timeoutMs=0) |
| Sets the period of the given status frame. More...
|
|
int | GetStatusFramePeriod (CANCoderStatusFrame frame, int timeoutMs=0) |
| Gets the period of the given status frame. More...
|
|
int | GetFirmwareVersion () |
| Gets the firmware version of the device. More...
|
|
bool | HasResetOccurred () |
| Returns true if the device has reset since last call. More...
|
|
ErrorCode | GetFaults (CANCoderFaults &toFill) |
| Gets the CANCoder fault status. More...
|
|
ErrorCode | GetStickyFaults (CANCoderStickyFaults &toFill) |
| Gets the CANCoder sticky fault status. More...
|
|
ErrorCode | ClearStickyFaults (int timeoutMs=0) |
| Clears the Sticky Faults. More...
|
|
ctre::phoenix::ErrorCode | ConfigAllSettings (const CANCoderConfiguration &allConfigs, int timeoutMs=50) |
| Configures all persistent settings. More...
|
|
ErrorCode | GetAllConfigs (CANCoderConfiguration &allConfigs, int timeoutMs=50) |
| Gets all persistant settings. More...
|
|
ErrorCode | ConfigFactoryDefault (int timeoutMs=50) |
| Configures all persistent settings to defaults (overloaded so timeoutMs is 50 ms). More...
|
|
CANCoderSimCollection & | GetSimCollection () |
|
| CANBusAddressable (int deviceNumber) |
| Constructor for a CANBusAddressable device. More...
|
|
int | GetDeviceNumber () |
|
CTRE CANCoder.
- Deprecated:
- This device's Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.