mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -39,7 +39,7 @@ HAL_DigitalHandle HAL_InitializeDIOPort(int32_t channel, HAL_Bool input,
|
||||
if (channel < 0 || channel >= kNumDigitalChannels) {
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for DIO", 0,
|
||||
kNumDigitalChannels, channel);
|
||||
kNumDigitalChannels, channel);
|
||||
return HAL_kInvalidHandle;
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ HAL_DigitalHandle HAL_InitializeDIOPort(int32_t channel, HAL_Bool input,
|
||||
if (*status != 0) {
|
||||
if (port) {
|
||||
wpi::hal::SetLastErrorPreviouslyAllocated(status, "PWM or DIO", channel,
|
||||
port->previousAllocation);
|
||||
port->previousAllocation);
|
||||
} else {
|
||||
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for DIO", 0,
|
||||
kNumDigitalChannels, channel);
|
||||
kNumDigitalChannels, channel);
|
||||
}
|
||||
return HAL_kInvalidHandle; // failed to allocate. Pass error back.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user