mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +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,6 +13,7 @@
|
||||
|
||||
#include "HAL/AnalogGyro.h"
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
// set the logging level
|
||||
TLogLevel analogGyroJNILogLevel = logWARNING;
|
||||
@@ -37,6 +38,8 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_AnalogGyroJNI_initializeAn
|
||||
HAL_GyroHandle handle = HAL_InitializeAnalogGyro((HAL_AnalogInputHandle)id, &status);
|
||||
ANALOGGYROJNI_LOG(logDEBUG) << "Status = " << status;
|
||||
ANALOGGYROJNI_LOG(logDEBUG) << "Gyro Handle = " << handle;
|
||||
// Analog input does range checking, so we don't need to do so.
|
||||
CheckStatus(env, status);
|
||||
return (jint) handle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user