From 17fcad9850754d2d0ec662c46e7940b07b64804c Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sat, 22 Oct 2011 15:28:38 +0000 Subject: git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@94 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- faceAPI/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'faceAPI') 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! // -- cgit v1.2.3