230 double distancePerPulse, int32_t* status);
242 HAL_Bool reverseDirection, int32_t* status);
252 int32_t samplesToAverage, int32_t* status);
@ HAL_ENUM
Definition: Value.h:14
HAL_AnalogTriggerType
The type of analog trigger to trigger on.
Definition: AnalogTrigger.h:20
void HAL_SetEncoderSamplesToAverage(HAL_EncoderHandle encoderHandle, int32_t samplesToAverage, int32_t *status)
Sets the number of encoder samples to average when calculating encoder rate.
HAL_EncoderHandle HAL_InitializeEncoder(HAL_Handle digitalSourceHandleA, HAL_AnalogTriggerType analogTriggerTypeA, HAL_Handle digitalSourceHandleB, HAL_AnalogTriggerType analogTriggerTypeB, HAL_Bool reverseDirection, HAL_EncoderEncodingType encodingType, int32_t *status)
Initializes an encoder.
void HAL_SetEncoderDistancePerPulse(HAL_EncoderHandle encoderHandle, double distancePerPulse, int32_t *status)
Sets the distance traveled per encoder pulse.
void HAL_SetEncoderMinRate(HAL_EncoderHandle encoderHandle, double minRate, int32_t *status)
Sets the minimum rate to be considered moving by the encoder.
HAL_Bool HAL_GetEncoderStopped(HAL_EncoderHandle encoderHandle, int32_t *status)
Determines if the clock is stopped.
void HAL_SetEncoderMaxPeriod(HAL_EncoderHandle encoderHandle, double maxPeriod, int32_t *status)
Sets the maximum period where the device is still considered "moving".
int32_t HAL_GetEncoderRaw(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the raw counts of the encoder.
HAL_Bool HAL_GetEncoderDirection(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the last direction the encoder value changed.
int32_t HAL_GetEncoderSamplesToAverage(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the current samples to average value.
void HAL_FreeEncoder(HAL_EncoderHandle encoderHandle, int32_t *status)
Frees an encoder.
void HAL_SetEncoderReverseDirection(HAL_EncoderHandle encoderHandle, HAL_Bool reverseDirection, int32_t *status)
Sets if to reverse the direction of the encoder.
double HAL_GetEncoderDistance(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the current distance traveled by the encoder.
double HAL_GetEncoderDecodingScaleFactor(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the decoding scale factor of the encoder.
void HAL_ResetEncoder(HAL_EncoderHandle encoderHandle, int32_t *status)
Reads the current encoder value.
void HAL_SetEncoderSimDevice(HAL_EncoderHandle handle, HAL_SimDeviceHandle device)
Indicates the encoder is used by a simulated device.
int32_t HAL_GetEncoderFPGAIndex(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the FPGA index of the encoder.
HAL_EncoderIndexingType
The type of index pulse for the encoder.
Definition: Encoder.h:21
int32_t HAL_GetEncoder(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the current counts of the encoder after encoding type scaling.
double HAL_GetEncoderDistancePerPulse(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the user set distance per pulse of the encoder.
HAL_EncoderEncodingType
The encoding scaling of the encoder.
Definition: Encoder.h:31
double HAL_GetEncoderPeriod(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the Period of the most recent count.
void HAL_SetEncoderIndexSource(HAL_EncoderHandle encoderHandle, HAL_Handle digitalSourceHandle, HAL_AnalogTriggerType analogTriggerType, HAL_EncoderIndexingType type, int32_t *status)
Sets the source for an index pulse on the encoder.
HAL_EncoderEncodingType HAL_GetEncoderEncodingType(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the encoding type of the encoder.
int32_t HAL_GetEncoderEncodingScale(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the encoder scale value.
double HAL_GetEncoderRate(HAL_EncoderHandle encoderHandle, int32_t *status)
Gets the current rate of the encoder.
@ HAL_kResetWhileLow
Definition: Encoder.h:23
@ HAL_kResetWhileHigh
Definition: Encoder.h:22
@ HAL_kResetOnRisingEdge
Definition: Encoder.h:25
@ HAL_kResetOnFallingEdge
Definition: Encoder.h:24
@ HAL_Encoder_k4X
Definition: Encoder.h:34
@ HAL_Encoder_k2X
Definition: Encoder.h:33
@ HAL_Encoder_k1X
Definition: Encoder.h:32
int32_t HAL_Bool
Definition: Types.h:73
int32_t HAL_Handle
Definition: Types.h:17
HAL_Handle HAL_SimDeviceHandle
Definition: Types.h:53
HAL_Handle HAL_EncoderHandle
Definition: Types.h:35
type
Definition: core.h:556