summaryrefslogtreecommitdiffhomepage
path: root/faceAPI
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-10-22 15:28:38 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-10-22 15:28:38 +0000
commit17fcad9850754d2d0ec662c46e7940b07b64804c (patch)
tree5875c85a90c8ff3b52bb360f0f1dde9a81b85544 /faceAPI
parentc4f8fe0c097a3282270db7eecda4c7eb533b99fc (diff)
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@94 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'faceAPI')
-rw-r--r--faceAPI/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/faceAPI/main.cpp b/faceAPI/main.cpp
index 48b7300b..2b46c713 100644
--- a/faceAPI/main.cpp
+++ b/faceAPI/main.cpp
@@ -328,6 +328,7 @@ void run()
if (pMemData) {
THROW_ON_ERROR(smVideoDisplayCreate(engine_handle,&video_display_handle,(smWindowHandle) pMemData->handle,TRUE));
THROW_ON_ERROR(smHTV2SetHeadPoseFilterLevel(engine_handle, pMemData->initial_filter_level));
+ pMemData->handshake = 0;
}
else {
THROW_ON_ERROR(smVideoDisplayCreate(engine_handle,&video_display_handle,0,TRUE));
@@ -385,7 +386,17 @@ void run()
//
THROW_ON_ERROR(smEngineGetState(engine_handle, &state));
pMemData->state = state;
-
+ pMemData->handshake += 1;
+
+ //
+ // Check if FaceTrackNoIR is still 'in contact'.
+ // FaceTrackNoIR will reset the handshake, every time in writes data.
+ // If the value rises too high, this exe will stop itself...
+ //
+ if ( pMemData->handshake > 200) {
+ stopCommand = TRUE;
+ }
+
//
// Check if a command was issued and do something with it!
//