summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
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;
}