Skip to content

Commit 2cfb310

Browse files
author
Matevz Morato
committed
Move implementation to the right place
1 parent f5497b9 commit 2cfb310

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/device/DeviceBase.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,13 @@ void DeviceBase::tryGetDevice() {
327327
if(numConnected > 0) {
328328
throw std::runtime_error("No available devices (" + std::to_string(numConnected) + " connected, but in use)");
329329
}
330-
}
331-
auto numDevicesAnyPlatform = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_ANY_PLATFORM).size();
332-
auto numDevicesRVC2 = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_MYRIAD_X).size();
333-
auto nonRVC2Devices = numDevicesAnyPlatform - numDevicesRVC2;
334-
if(nonRVC2Devices > 0) {
335-
throw std::runtime_error("No available RVC2 devices found, but found " + std::to_string(nonRVC2Devices)
336-
+ " non RVC2 device[s]. To use RVC4 devices, please update DepthAI to version v3.x or newer.");
330+
auto numDevicesAnyPlatform = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_ANY_PLATFORM).size();
331+
auto numDevicesRVC2 = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_MYRIAD_X).size();
332+
auto nonRVC2Devices = numDevicesAnyPlatform - numDevicesRVC2;
333+
if(nonRVC2Devices > 0) {
334+
throw std::runtime_error("No available RVC2 devices found, but found " + std::to_string(nonRVC2Devices)
335+
+ " non RVC2 device[s]. To use RVC4 devices, please update DepthAI to version v3.x or newer.");
336+
}
337337
}
338338
}
339339

0 commit comments

Comments
 (0)