mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT: FRC_ replacements
This commit is contained in:
committed by
Peter Johnson
parent
824f36f63a
commit
928ff20695
@@ -19,12 +19,12 @@ std::set<int> XRPMotor::s_registeredDevices = {};
|
||||
|
||||
void XRPMotor::CheckDeviceAllocation(int deviceNum) {
|
||||
if (s_simDeviceMap.count(deviceNum) == 0) {
|
||||
throw FRC_MakeError(wpi::err::ChannelIndexOutOfRange, "Channel {}",
|
||||
throw WPILIB_MakeError(wpi::err::ChannelIndexOutOfRange, "Channel {}",
|
||||
deviceNum);
|
||||
}
|
||||
|
||||
if (s_registeredDevices.count(deviceNum) > 0) {
|
||||
throw FRC_MakeError(wpi::err::ResourceAlreadyAllocated, "Channel {}",
|
||||
throw WPILIB_MakeError(wpi::err::ResourceAlreadyAllocated, "Channel {}",
|
||||
deviceNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ std::set<int> XRPServo::s_registeredDevices = {};
|
||||
|
||||
void XRPServo::CheckDeviceAllocation(int deviceNum) {
|
||||
if (s_simDeviceMap.count(deviceNum) == 0) {
|
||||
throw FRC_MakeError(wpi::err::ChannelIndexOutOfRange, "Channel {}",
|
||||
throw WPILIB_MakeError(wpi::err::ChannelIndexOutOfRange, "Channel {}",
|
||||
deviceNum);
|
||||
}
|
||||
|
||||
if (s_registeredDevices.count(deviceNum) > 0) {
|
||||
throw FRC_MakeError(wpi::err::ResourceAlreadyAllocated, "Channel {}",
|
||||
throw WPILIB_MakeError(wpi::err::ResourceAlreadyAllocated, "Channel {}",
|
||||
deviceNum);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user