mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +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
@@ -13,7 +13,7 @@
|
||||
#include "AnalogInternal.h"
|
||||
#include "HAL/AnalogAccumulator.h"
|
||||
#include "HAL/AnalogInput.h"
|
||||
#include "handles/IndexedHandleResource.h"
|
||||
#include "HAL/handles/IndexedHandleResource.h"
|
||||
|
||||
namespace {
|
||||
struct AnalogGyro {
|
||||
@@ -46,7 +46,7 @@ HAL_GyroHandle HAL_InitializeAnalogGyro(HAL_AnalogInputHandle analog_handle,
|
||||
int32_t* status) {
|
||||
if (!HAL_IsAccumulatorChannel(analog_handle, status)) {
|
||||
if (*status == 0) {
|
||||
*status = PARAMETER_OUT_OF_RANGE;
|
||||
*status = HAL_INVALID_ACCUMULATOR_CHANNEL;
|
||||
}
|
||||
return HAL_kInvalidHandle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user