#include <AbsoluteEncoderConfig.h>
Inherits rev::spark::BaseConfig.
◆ AbsoluteEncoderConfig() [1/3]
rev::spark::AbsoluteEncoderConfig::AbsoluteEncoderConfig |
( |
| ) |
|
|
default |
◆ ~AbsoluteEncoderConfig()
rev::spark::AbsoluteEncoderConfig::~AbsoluteEncoderConfig |
( |
| ) |
|
|
overridedefault |
◆ AbsoluteEncoderConfig() [2/3]
◆ AbsoluteEncoderConfig() [3/3]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Apply()
Applies settings from another AbsoluteEncoderConfig to this one.
Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
- Parameters
-
- Returns
- The updated AbsoluteEncoderConfig for method chaining
◆ SetSparkMaxDataPortConfig()
Configures the data port to use the absolute encoder, which is specifically required for SPARK MAX.
NOTE: This method is only necessary when using an absolute encoder with a SPARK MAX without configuring any of its settings
IMPORTANT: SPARK MAX does not support using an absolute encoder in conjunction with an alternate encoder.
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ Inverted()
Set the phase of the absolute encoder so that it is in phase with the motor itself.
- Parameters
-
inverted | The phase of the encoder |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ PositionConversionFactor()
Set the conversion factor for the position of the absolute encoder. Position is returned in native units of rotations and will be multiplied by this conversion factor.
- Parameters
-
factor | The conversion factor to multiply the native units by |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ VelocityConversionFactor()
Set the conversion factor for the velocity of the absolute encoder. Velocity is returned in native units of rotations per minute and will be multiplied by this conversion factor.
- Parameters
-
factor | The conversion factor to multiply the native units by |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ ZeroOffset()
Set the zero offset of the absolute encoder, the position that is reported as zero.
The zero offset is specified as the reported position of the encoder in the desired zero position as if the zero offset was set to 0, the position conversion factor was set to 1, and inverted was set to false.
- Parameters
-
offset | The zero offset in the range [0, 1) |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ AverageDepth()
Set the average sampling depth of the absolute encoder. This is a bit size and should be either 1, 2, 4, 8, 16, 32, 64, or 128 (default).
- Parameters
-
depth | The average sampling depth of 1, 2, 4, 8, 16, 32, 64, or 128 |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ StartPulseUs()
Set the length of the start pulse for this encoder. This pulse will be treated as the 0.0 position.
- Parameters
-
startPulseUs | The minimum high pulse in microseconds |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
◆ EndPulseUs()
Set the length of the end pulse for this encoder. This pulse will be treated as the 1.0 position.
- Parameters
-
endPulseUs | The minimum low pulse in microseconds |
- Returns
- The modified AbsoluteEncoderConfig object for method chaining
The documentation for this class was generated from the following files: