#include <DetachedEncoder.h>
Inherits rev::RelativeEncoder, and rev::detached::DetachedEncoderLowLevel.
Inherited by rev::detached::SplineEncoder.
◆ DetachedEncoder() [1/3]
◆ DetachedEncoder() [2/3]
| rev::detached::DetachedEncoder::DetachedEncoder |
( |
const DetachedEncoder & |
rhs | ) |
|
|
default |
◆ ~DetachedEncoder()
| rev::detached::DetachedEncoder::~DetachedEncoder |
( |
| ) |
|
|
overridedefault |
Closes the Detached encoder controller
◆ DetachedEncoder() [3/3]
| DetachedEncoder::DetachedEncoder |
( |
int |
deviceID, |
|
|
EncoderModel |
model |
|
) |
| |
|
protected |
Create a new object to control a Detached Encoder
- Parameters
-
| deviceID | The device ID. |
| model | The specific model of detached encoder |
◆ operator=()
◆ GetPosition()
| double DetachedEncoder::GetPosition |
( |
| ) |
const |
|
overridevirtual |
◆ GetVelocity()
| double DetachedEncoder::GetVelocity |
( |
| ) |
const |
|
overridevirtual |
◆ GetAngle()
| double DetachedEncoder::GetAngle |
( |
| ) |
const |
◆ GetRawAngle()
| double DetachedEncoder::GetRawAngle |
( |
| ) |
const |
Get the absolute position of the encoder. This returns the native units of 'rotations' [0, 1) without scaling from conversion factors.
- Returns
- Number of rotations of the encoder
◆ SetPosition()
◆ Configure()
Set the configuration for the Detached encoder.
If resetMode is ResetMode::kResetSafeParameters, this method will reset safe writable parameters to their default values before setting the given configuration.
- Parameters
-
| config | The desired Detached encoder configuration |
| resetMode | Whether to reset safe parameters before setting the configuration |
- Returns
- REVLibError::kOk if successful
◆ GetFaults()
Get the active faults that are currently present on the detached encoder.
- Returns
- A struct with each fault and their active value
◆ GetStickyFaults()
Get the sticky faults that were present on the detached encoder at one point since the sticky faults were last cleared.
Sticky faults can be cleared with DetachedEncoder::ClearFaults().
- Returns
- A struct with each fault and their sticky value
◆ ClearFaults()
Clears all sticky faults.
◆ configAccessor
Accessor for Detached encoder parameter values. This object contains fields and methods to retrieve parameters that have been applied to the device. To set parameters, see DetachedEncoderConfig and DetachedEncoder::Configure().
NOTE: This uses calls that are blocking to retrieve parameters and should be used infrequently.
The documentation for this class was generated from the following files: