Skip to content

Commit

Permalink
Merge pull request #529 from nicost/OpenCV2
Browse files Browse the repository at this point in the history
OpenCV: Now backward compatible with previous config files.
  • Loading branch information
nicost authored Nov 22, 2024
2 parents 7d951c2 + f51a95c commit 870fdb1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions DeviceAdapters/OpenCVgrabber/OpenCVgrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ COpenCVgrabber::COpenCVgrabber() :
AddAllowedValue(cIDName, devices.at(i).deviceName.c_str());
}
}
else {
AddAllowedValue(cIDName, "Undefined");
}
// when no devices are found and for backward compatibility, allow the Undefined value
AddAllowedValue(cIDName, "Undefined");
#else
String cIDNameReally = "Camera Number";
CPropertyAction* pAct = new CPropertyAction(this, &COpenCVgrabber::OnCameraID);
Expand Down Expand Up @@ -1097,8 +1096,8 @@ int COpenCVgrabber::OnCameraID(MM::PropertyBase* pProp, MM::ActionType eAct)
return DEVICE_OK;
}
}
pProp->Set("Undefined");
}
return DEVICE_NOT_CONNECTED;
#else
if (eAct == MM::AfterSet)
{
Expand Down

0 comments on commit 870fdb1

Please sign in to comment.