loading
 
ini_file and API
Anonymous
14 year
I am trying to get RR start in a known configuration. Specifically I want the camera off as when it starts ON it gives an error message and my API can no longer control it.

How do I turn the camera OFF from an API?

Also, you say you can load ini_files rather than from the registry but I cannot find any ini_file examples. Maybe if I turned the camera OFF in the ini_file it would do what I wanted and stop bringing up an error message that demands a response.
Davide Fabbri from Italy  [8 posts] 14 year
I'm quite new to RR, but if you want to turn on/off/change camera from api you could use someting like this ( form api.zip example in c++ ):

    // turn off camera
    rr.setCamera("off");
    // turn on camera
    rr.setCamera("on");
    // change the camera to another one
    rr.setCamera("CompUSA PC Camera");
    Sleep(2000);
    // now set it back
    rr.setCamera("Logitech");

to test it from telnet you coud use someting like:

<request>
    <set_camera>CMD</set_camera>
</request>

replace CMD with on,off or camera name
Anonymous 14 year
Thanks Davide,

Sorry I misphrased the question.
Not how to turn off the camera in the API, rather how to turn off the camera in the ini_file of the API. Once the API runs roborealm it is too late.

The ini_file is mentioned but I cant find documentation on its format.


Anonymous 14 year
The ini_file is only an option when you start the API ... while what you want to do is possible using the ini file I'd first just start by modifying the Registry instead. RR will use the Registry by default and only switch to the ini_file when that is specified in the RR startup via the API ... so it is a little tricky to modify.

If you look under

HKEY_CURRENT_USER->Software->RoboRealm->Instance_2->LastDriver

and set that value to "" RR will startup without a camera running.

STeven.
Davide Fabbri from Italy  [8 posts] 14 year
I think that it is safer to modify the registry key ( in the program ) every time before executing RR ( because on exiting the registry key is updated ).


P.S. the 'default' key should be HKEY_CURRENT_USER->Software->RoboRealm->Instance_1->LastDriver

if you specify -instance_2 on the command line the key should be HKEY_CURRENT_USER->Software->RoboRealm->Instance_2->LastDriver

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index