mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51: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
@@ -14,6 +14,8 @@
|
||||
#include "HAL/DIO.h"
|
||||
#include "HAL/PWM.h"
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/Ports.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
// set the logging level
|
||||
TLogLevel dioJNILogLevel = logWARNING;
|
||||
@@ -41,7 +43,8 @@ Java_edu_wpi_first_wpilibj_hal_DIOJNI_initializeDIOPort(
|
||||
auto dio = HAL_InitializeDIOPort((HAL_PortHandle)id, (uint8_t)input, &status);
|
||||
DIOJNI_LOG(logDEBUG) << "Status = " << status;
|
||||
DIOJNI_LOG(logDEBUG) << "DIO Handle = " << dio;
|
||||
CheckStatus(env, status);
|
||||
CheckStatusRange(env, 0, HAL_GetNumDigitalPins(),
|
||||
hal::getPortHandlePin((HAL_PortHandle)id), status);
|
||||
return (jint)dio;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user