Log in or register to post comments

TargetFinder::startInit always succeed

March 26, 2013 - 5:16am #1
  if (targetFinder->startInit("truc", "toto")) {
    targetFinder->waitUntilInitFinished();
  }
  if (resultCode != QCAR::TargetFinder::INIT_SUCCESS)
    AR_THROW_EXCEPTION("QCAR: Failed to initialize target finder: unknown error.");

 

 

With this code I always get INIT_SUCCESS, event with obviously wrong api keys.

Am i doing something wrong !?

 

 

TargetFinder::startInit always succeed

March 26, 2013 - 8:35am #3

Hi, concerning your first posted message (no init error returned), that is the expected behaviour;

in fact, the initialization does not reports errors in case of wrong keys (it only reports error in case of "no connection" or "service not available");

on the other hand, if the keys are invalid, the you will get an authentication error code later when calling updateSearchResults();

 

Concerning your second question:

if finder->updateSearchResults(); is called without finder->startRecognition();

this is also the expected behaviour; an error code is returned only if an actual error condition is detected; if you simply did not start the recognition (i.e. you did not call finder->startRecognition() prior to calling updateSearchResult) then the system is not in an error state; the only thing that will happens in this case is that the result list will be empty.

 

 

TargetFinder::startInit always succeed

March 26, 2013 - 5:26am #2

moreover,

if finder->updateSearchResults(); is called without finder->startRecognition();

no error is returned !

Log in or register to post comments