Collection of sensors available to the Talon FX.
For best performance and update-rate, we recommend using the configSelectedFeedbackSensor() and getSelectedSensor*() routines. However there are occasions where accessing raw sensor values may be useful or convenient. Particularly if you are seeding one sensor based on another, or need to circumvent sensor-phase.
Use the getTalonFXSensorCollection() routine inside your motor controller to create a sensor collection.
double com.ctre.phoenix.motorcontrol.TalonFXSensorCollection.getIntegratedSensorAbsolutePosition |
( |
| ) |
|
|
inline |
Get the IntegratedSensor absolute position of the Talon FX, regardless of whether it is actually being used for feedback. This will be within one rotation (2048 units). The signage and range will depend on the configuration. Note : Future versions of software may support scaling features (rotations, radians, degrees, etc) depending on the configuration.
This method relies on the Status 21 message, which has a default period of 240ms. For more information, see: https://phoenix-documentation.readthedocs.io/en/latest/ch18_CommonAPI.html
- Returns
- the IntegratedSensor absolute position.
double com.ctre.phoenix.motorcontrol.TalonFXSensorCollection.getIntegratedSensorPosition |
( |
| ) |
|
|
inline |
Get the IntegratedSensor position of the Talon FX, regardless of whether it is actually being used for feedback. The units are 2048 per rotation. Note : Future versions of software may support scaling features (rotations, radians, degrees, etc) depending on the configuration.
This method relies on the Status 21 message, which has a default period of 240ms. For more information, see: https://phoenix-documentation.readthedocs.io/en/latest/ch18_CommonAPI.html
- Returns
- the IntegratedSensor position.
double com.ctre.phoenix.motorcontrol.TalonFXSensorCollection.getIntegratedSensorVelocity |
( |
| ) |
|
|
inline |
Get the IntegratedSensor velocity of the Talon FX, regardless of whether it is actually being used for feedback. One unit represents one position unit per 100ms (2048 position units per 100ms). The signage and range will depend on the configuration. Note : Future versions of software may support scaling features (rotations, radians, degrees, etc) depending on the configuration.
This method relies on the Status 21 message, which has a default period of 240ms. For more information, see: https://phoenix-documentation.readthedocs.io/en/latest/ch18_CommonAPI.html
- Returns
- the IntegratedSensor velocity.