mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Switches all HAL Handle errors to be zero (#100)
As discussed, we don't really need the error checking specifically, as we are just going to throw exceptions anyway, so this will make sure you can check for 0 and be sure you catch any handle errors.
This commit is contained in:
committed by
Peter Johnson
parent
fc515f4572
commit
c3908660b1
@@ -30,7 +30,7 @@ void* initializeAnalogInputPort(HalPortHandle port_handle, int32_t* status) {
|
||||
if (*status != 0) return nullptr;
|
||||
|
||||
int16_t pin = getPortHandlePin(port_handle);
|
||||
if (pin == HAL_HANDLE_INVALID_TYPE) {
|
||||
if (pin == InvalidHandleIndex) {
|
||||
*status = PARAMETER_OUT_OF_RANGE;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user