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