mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,ntcore,cscore] Update Handle constants to all caps
This commit is contained in:
@@ -36,7 +36,7 @@ HAL_AnalogInputHandle HAL_InitializeAnalogInputPort(
|
||||
|
||||
HAL_DigitalHandle handle;
|
||||
|
||||
auto port = smartIoHandles->Allocate(channel, HAL_HandleEnum::AnalogInput,
|
||||
auto port = smartIoHandles->Allocate(channel, HAL_HandleEnum::ANALOG_INPUT,
|
||||
&handle, status);
|
||||
|
||||
if (*status != 0) {
|
||||
@@ -54,7 +54,7 @@ HAL_AnalogInputHandle HAL_InitializeAnalogInputPort(
|
||||
|
||||
*status = port->InitializeMode(SmartIoMode::AnalogInput);
|
||||
if (*status != 0) {
|
||||
smartIoHandles->Free(handle, HAL_HandleEnum::AnalogInput);
|
||||
smartIoHandles->Free(handle, HAL_HandleEnum::ANALOG_INPUT);
|
||||
return HAL_kInvalidHandle;
|
||||
}
|
||||
|
||||
@@ -65,12 +65,12 @@ HAL_AnalogInputHandle HAL_InitializeAnalogInputPort(
|
||||
|
||||
void HAL_FreeAnalogInputPort(HAL_AnalogInputHandle analogPortHandle) {
|
||||
auto port =
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::AnalogInput);
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::ANALOG_INPUT);
|
||||
if (port == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
smartIoHandles->Free(analogPortHandle, HAL_HandleEnum::AnalogInput);
|
||||
smartIoHandles->Free(analogPortHandle, HAL_HandleEnum::ANALOG_INPUT);
|
||||
|
||||
// Wait for no other object to hold this handle.
|
||||
auto start = wpi::hal::monotonic_clock::now();
|
||||
@@ -133,7 +133,7 @@ int32_t HAL_GetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t HAL_GetAnalogValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
auto port =
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::AnalogInput);
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::ANALOG_INPUT);
|
||||
if (port == nullptr) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
@@ -159,7 +159,7 @@ int32_t HAL_GetAnalogVoltsToValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
double HAL_GetAnalogVoltage(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
auto port =
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::AnalogInput);
|
||||
smartIoHandles->Get(analogPortHandle, HAL_HandleEnum::ANALOG_INPUT);
|
||||
if (port == nullptr) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user