update video camera logic

This commit is contained in:
2024-12-11 14:46:50 +01:00
parent c65f310e81
commit e8db00120f

View File

@@ -283,8 +283,11 @@ void sendKobukiData(TKobukiData &data) {
void CapnSend() {
VideoCapture cap(1); // Open the default camera
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;
}