mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +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
@@ -11,11 +11,11 @@
|
||||
#include "FRC_NetworkCommunication/LoadOut.h"
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Ports.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "HAL/handles/IndexedHandleResource.h"
|
||||
#include "PCMInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "ctre/PCM.h"
|
||||
#include "handles/HandlesInternal.h"
|
||||
#include "handles/IndexedHandleResource.h"
|
||||
|
||||
namespace {
|
||||
struct Solenoid {
|
||||
@@ -44,7 +44,7 @@ HAL_SolenoidHandle HAL_InitializeSolenoidPort(HAL_PortHandle port_handle,
|
||||
|
||||
// initializePCM will check the module
|
||||
if (!HAL_CheckSolenoidPin(pin)) {
|
||||
*status = PARAMETER_OUT_OF_RANGE;
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
return HAL_kInvalidHandle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user