Skip to content

Commit

Permalink
openCV: Now backward compatible with oprevious config files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Stuurman committed Nov 22, 2024
1 parent 7d951c2 commit f51a95c
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 f51a95c

Please sign in to comment.