SCRIPT: wpiformat

This commit is contained in:
PJ Reiniger
2025-11-07 20:01:58 -05:00
committed by Peter Johnson
parent ae6bdc9d25
commit 2109161534
749 changed files with 5504 additions and 3936 deletions

View File

@@ -33,8 +33,8 @@ HAL_CounterHandle HAL_InitializeCounter(int channel, HAL_Bool risingEdge,
wpi::hal::init::CheckInit();
if (channel == InvalidHandleIndex || channel >= kNumSmartIo) {
*status = RESOURCE_OUT_OF_RANGE;
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for Counter", 0,
kNumSmartIo, channel);
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for Counter",
0, kNumSmartIo, channel);
return HAL_kInvalidHandle;
}
@@ -46,10 +46,10 @@ HAL_CounterHandle HAL_InitializeCounter(int channel, HAL_Bool risingEdge,
if (*status != 0) {
if (port) {
wpi::hal::SetLastErrorPreviouslyAllocated(status, "SmartIo", channel,
port->previousAllocation);
port->previousAllocation);
} else {
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for Counter", 0,
kNumSmartIo, channel);
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for Counter",
0, kNumSmartIo, channel);
}
return HAL_kInvalidHandle; // failed to allocate. Pass error back.
}