Hello,
I have a very small problem with my C120 cameras.
I've written a software (C++). Everything works fine except that the Numeric LEDs don't turn off.
I've tried several things like :
cameraToClose->SetOption(NP_OPTION_NUMERIC_DISPLAY_OFF, (CComVariant) 0);
I have tried other values than 0 like 255 or -1.
I dont know wich value I should put in this function (in the manuel it's said N/A so...).
I've noticed that it does not work too with the cpp1 example (MFC) but it works fine with the PointCloud calibration tool.
Thanking you in advance.
Numerid Displays dont turn off
Re: Numerid Displays dont turn off
Which version of the OptiTrack SDK do you have installed?
I just tested and verified that the following code sets the display and then clears it (using a modified vc8b sample).
I just tested and verified that the following code sets the display and then clears it (using a modified vc8b sample).
Code: Select all
CComVariant displayVal;
displayVal.intVal = 35;
displayVal.vt = VT_INT;
hr = m_spCamera->SetOption(NP_OPTION_NUMERIC_DISPLAY_ON, displayVal);
hr = m_spCamera->SetOption(NP_OPTION_NUMERIC_DISPLAY_OFF, CComVariant (0));
Re: Numerid Displays dont turn off
I've tried with the SDK 1.1.031 and 1.1.032 beta 02 on different computers.
I have tried your code and it's work fine. Actually it seems that my problem comes from the fact that I had aleardy used the start() and stop() function.
I just add camera->Start() and Stop() and the last part and it works fine now.
Thank you very much !
I have tried your code and it's work fine. Actually it seems that my problem comes from the fact that I had aleardy used the start() and stop() function.
Code: Select all
cameraCollection->Item(index, &camera);
camera->SetOption(NP_OPTION_NUMERIC_DISPLAY_ON, (CComVariant) id);
camera->SetOption(NP_OPTION_NUMERIC_DISPLAY_OFF, CComVariant(0));
// OK (Open, Close, Start and Stop are not used yet)
(...)
camera->Open();
camera->Start();
camera->SetOption(NP_OPTION_NUMERIC_DISPLAY_OFF, CComVariant(0)); // OK
camera->Stop();
camera->Close();
(...)
camera->Open(); // Or without this...
camera->SetOption(NP_OPTION_NUMERIC_DISPLAY_OFF, CComVariant(0)); // Didn't work
cmaera->Close();
Thank you very much !