WPILibC++
2019.1.1-beta-2-14-gdf347e3
|
Functions | |
HAL_ENUM (HAL_AnalogTriggerType) | |
The type of analog trigger to trigger on. | |
HAL_AnalogTriggerHandle | HAL_InitializeAnalogTrigger (HAL_AnalogInputHandle portHandle, int32_t *index, int32_t *status) |
Initializes an analog trigger. More... | |
void | HAL_CleanAnalogTrigger (HAL_AnalogTriggerHandle analogTriggerHandle, int32_t *status) |
Frees an analog trigger. More... | |
void | HAL_SetAnalogTriggerLimitsRaw (HAL_AnalogTriggerHandle analogTriggerHandle, int32_t lower, int32_t upper, int32_t *status) |
Sets the raw ADC upper and lower limits of the analog trigger. More... | |
void | HAL_SetAnalogTriggerLimitsVoltage (HAL_AnalogTriggerHandle analogTriggerHandle, double lower, double upper, int32_t *status) |
Sets the upper and lower limits of the analog trigger. More... | |
void | HAL_SetAnalogTriggerAveraged (HAL_AnalogTriggerHandle analogTriggerHandle, HAL_Bool useAveragedValue, int32_t *status) |
Configures the analog trigger to use the averaged vs. More... | |
void | HAL_SetAnalogTriggerFiltered (HAL_AnalogTriggerHandle analogTriggerHandle, HAL_Bool useFilteredValue, int32_t *status) |
Configures the analog trigger to use a filtered value. More... | |
HAL_Bool | HAL_GetAnalogTriggerInWindow (HAL_AnalogTriggerHandle analogTriggerHandle, int32_t *status) |
Returns the InWindow output of the analog trigger. More... | |
HAL_Bool | HAL_GetAnalogTriggerTriggerState (HAL_AnalogTriggerHandle analogTriggerHandle, int32_t *status) |
Returns the TriggerState output of the analog trigger. More... | |
HAL_Bool | HAL_GetAnalogTriggerOutput (HAL_AnalogTriggerHandle analogTriggerHandle, HAL_AnalogTriggerType type, int32_t *status) |
Gets the state of the analog trigger output. More... | |
void HAL_CleanAnalogTrigger | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
int32_t * | status | ||
) |
Frees an analog trigger.
analogTriggerHandle | the trigger handle |
HAL_Bool HAL_GetAnalogTriggerInWindow | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
int32_t * | status | ||
) |
Returns the InWindow output of the analog trigger.
True if the analog input is between the upper and lower limits.
analogTriggerHandle | the trigger handle |
HAL_Bool HAL_GetAnalogTriggerOutput | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
HAL_AnalogTriggerType | type, | ||
int32_t * | status | ||
) |
Gets the state of the analog trigger output.
analogTriggerHandle | the trigger handle |
type | the type of trigger to trigger on |
HAL_Bool HAL_GetAnalogTriggerTriggerState | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
int32_t * | status | ||
) |
Returns the TriggerState output of the analog trigger.
True if above upper limit. False if below lower limit. If in Hysteresis, maintain previous state.
analogTriggerHandle | the trigger handle |
HAL_AnalogTriggerHandle HAL_InitializeAnalogTrigger | ( | HAL_AnalogInputHandle | portHandle, |
int32_t * | index, | ||
int32_t * | status | ||
) |
Initializes an analog trigger.
portHandle | the analog input to use for triggering |
index | the trigger index value (output) |
void HAL_SetAnalogTriggerAveraged | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
HAL_Bool | useAveragedValue, | ||
int32_t * | status | ||
) |
Configures the analog trigger to use the averaged vs.
raw values.
If the value is true, then the averaged value is selected for the analog trigger, otherwise the immediate value is used.
analogTriggerHandle | the trigger handle |
useAveragedValue | true to use averaged values, false for raw |
void HAL_SetAnalogTriggerFiltered | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
HAL_Bool | useFilteredValue, | ||
int32_t * | status | ||
) |
Configures the analog trigger to use a filtered value.
The analog trigger will operate with a 3 point average rejection filter. This is designed to help with 360 degree pot applications for the period where the pot crosses through zero.
analogTriggerHandle | the trigger handle |
useFilteredValue | true to use filtered values, false for average or raw |
void HAL_SetAnalogTriggerLimitsRaw | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
int32_t | lower, | ||
int32_t | upper, | ||
int32_t * | status | ||
) |
Sets the raw ADC upper and lower limits of the analog trigger.
HAL_SetAnalogTriggerLimitsVoltage is likely better in most cases.
analogTriggerHandle | the trigger handle |
lower | the lower ADC value |
upper | the upper ADC value |
void HAL_SetAnalogTriggerLimitsVoltage | ( | HAL_AnalogTriggerHandle | analogTriggerHandle, |
double | lower, | ||
double | upper, | ||
int32_t * | status | ||
) |
Sets the upper and lower limits of the analog trigger.
The limits are given as floating point voltage values.
analogTriggerHandle | the trigger handle |
lower | the lower voltage value |
upper | the upper voltage value |