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
@@ -12,7 +12,9 @@
|
||||
#include "edu_wpi_first_wpilibj_hal_RelayJNI.h"
|
||||
|
||||
#include "HAL/Relay.h"
|
||||
#include "HAL/Ports.h"
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
// set the logging level
|
||||
TLogLevel relayJNILogLevel = logWARNING;
|
||||
@@ -39,6 +41,8 @@ JNIEXPORT jint JNICALL Java_edu_wpi_first_wpilibj_hal_RelayJNI_initializeRelayPo
|
||||
HAL_RelayHandle handle = HAL_InitializeRelayPort((HAL_PortHandle)id, (uint8_t) fwd, &status);
|
||||
RELAYJNI_LOG(logDEBUG) << "Status = " << status;
|
||||
RELAYJNI_LOG(logDEBUG) << "Relay Handle = " << handle;
|
||||
CheckStatusRange(env, 0, HAL_GetNumRelayPins(),
|
||||
hal::getPortHandlePin((HAL_PortHandle)id), status);
|
||||
return (jint) handle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user