diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index 4dbd83c..bd3984d 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -283,8 +283,11 @@ void sendKobukiData(TKobukiData &data) { void CapnSend() { - VideoCapture cap(1); // Open the default camera - if (!cap.isOpened()) { + VideoCapture cap(0); // Open the default camera + if (!cap.isOpened()) { + int i = 0; + VideoCapture cap(i++); // Open the default camera + cerr << "Error: Could not open camera" << endl; return; }