mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Implements Better Error Messages from the HAL (#172)
* Makes the HAL provide a better error message for certain things. * Makes Java error messages better * Updates C++ errors. * Moves handles header folder to HAL directory
This commit is contained in:
committed by
Peter Johnson
parent
05c00430b3
commit
d2aa168f66
@@ -36,6 +36,10 @@ HAL_Bool HAL_IsAccumulatorChannel(HAL_AnalogInputHandle analog_port_handle,
|
||||
*/
|
||||
void HAL_InitAccumulator(HAL_AnalogInputHandle analog_port_handle,
|
||||
int32_t* status) {
|
||||
if (!HAL_IsAccumulatorChannel(analog_port_handle, status)) {
|
||||
*status = HAL_INVALID_ACCUMULATOR_CHANNEL;
|
||||
return;
|
||||
}
|
||||
HAL_SetAccumulatorCenter(analog_port_handle, 0, status);
|
||||
HAL_ResetAccumulator(analog_port_handle, status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user