summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-14 17:13:39 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-14 17:13:39 +0000
commit7db1d177f944de01f7fb7a78b16a8a3df22e9746 (patch)
tree2098868089e74cedb9c37d187d5b6703cc76c388 /FaceTrackNoIR
parent481fe3ad24c784441743c40510c9c15b78e2171d (diff)
Added notifyCenter method for Arduino (and Patrick)
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@138 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/FTNoIR_Curves.ui6
-rw-r--r--FaceTrackNoIR/tracker.cpp22
2 files changed, 18 insertions, 10 deletions
diff --git a/FaceTrackNoIR/FTNoIR_Curves.ui b/FaceTrackNoIR/FTNoIR_Curves.ui
index 1f01fb27..19c68cf0 100644
--- a/FaceTrackNoIR/FTNoIR_Curves.ui
+++ b/FaceTrackNoIR/FTNoIR_Curves.ui
@@ -128,7 +128,7 @@ color: rgb(255, 255, 255);
<property name="minimumSize">
<size>
<width>260</width>
- <height>300</height>
+ <height>240</height>
</size>
</property>
<property name="maximumSize">
@@ -138,10 +138,10 @@ color: rgb(255, 255, 255);
</size>
</property>
<property name="maxOutputEGU" stdset="0">
- <number>120</number>
+ <number>180</number>
</property>
<property name="pixPerEGU_Output" stdset="0">
- <number>2</number>
+ <number>1</number>
</property>
<property name="colorBezier">
<color>
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index c0470758..b9497fde 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -471,15 +471,23 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
//
// If Center is pressed, copy the current values to the offsets.
//
- if (Tracker::confid && Tracker::do_center) {
+ if (Tracker::do_center) {
+
MessageBeep (MB_ICONASTERISK);
+ pTracker->notifyCenter(); // Send 'center' to the tracker
- offset_camera.position.x = getSmoothFromList( &X.rawList );
- offset_camera.position.y = getSmoothFromList( &Y.rawList );
- offset_camera.position.z = getSmoothFromList( &Z.rawList );
- offset_camera.position.pitch = getSmoothFromList( &Pitch.rawList );
- offset_camera.position.yaw = getSmoothFromList( &Yaw.rawList );
- offset_camera.position.roll = getSmoothFromList( &Roll.rawList );
+ //
+ // Only copy valid values
+ //
+ if (Tracker::confid) {
+
+ offset_camera.position.x = getSmoothFromList( &X.rawList );
+ offset_camera.position.y = getSmoothFromList( &Y.rawList );
+ offset_camera.position.z = getSmoothFromList( &Z.rawList );
+ offset_camera.position.pitch = getSmoothFromList( &Pitch.rawList );
+ offset_camera.position.yaw = getSmoothFromList( &Yaw.rawList );
+ offset_camera.position.roll = getSmoothFromList( &Roll.rawList );
+ }
Tracker::do_center = false;
}