From 863efe5f6f51fb0fd9dedec38527a11e8510e0f2 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Mon, 27 Aug 2012 13:40:13 +0000 Subject: For update v170 alpha 2 git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@121 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Protocol_FT/FTNoIR_FTcontrols.ui | 33 +++---------------------------- FTNoIR_Protocol_FT/FTNoIR_Protocol_FT.cpp | 6 +++--- FTNoIR_Protocol_SC/FTNoIR_SCcontrols.ui | 16 +++------------ FaceTrackNoIR.sln | 12 +++++++++++ FaceTrackNoIR/FTNoIR_Curves.ui | 2 +- FaceTrackNoIR/FaceTrackNoIR.cpp | 2 +- FaceTrackNoIR/tracker.cpp | 27 +++++++++++++++++++------ 7 files changed, 44 insertions(+), 54 deletions(-) diff --git a/FTNoIR_Protocol_FT/FTNoIR_FTcontrols.ui b/FTNoIR_Protocol_FT/FTNoIR_FTcontrols.ui index 89b5d712..29cba42b 100644 --- a/FTNoIR_Protocol_FT/FTNoIR_FTcontrols.ui +++ b/FTNoIR_Protocol_FT/FTNoIR_FTcontrols.ui @@ -7,11 +7,11 @@ 0 0 411 - 157 + 112 - FTIR settings FaceTrackNoIR + FreeTrack settings FaceTrackNoIR @@ -39,16 +39,6 @@ - - - - Qt::RightToLeft - - - Use TIRViews - - - @@ -69,24 +59,7 @@ - TIRViews is only required for some older games (like CFS3). - - - - - - - For it to work, TIRViews.dll must be placed in the FaceTrackNoIR program folder. - - - true - - - - - - - If the checkbox is disabled, the DLL was not found. + There are no settings necessary for the FreeTrack protocol. diff --git a/FTNoIR_Protocol_FT/FTNoIR_Protocol_FT.cpp b/FTNoIR_Protocol_FT/FTNoIR_Protocol_FT.cpp index e6100956..d51072e5 100644 --- a/FTNoIR_Protocol_FT/FTNoIR_Protocol_FT.cpp +++ b/FTNoIR_Protocol_FT/FTNoIR_Protocol_FT.cpp @@ -356,7 +356,7 @@ QWidget() // Connect Qt signals to member-functions connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); - connect(ui.chkTIRViews, SIGNAL(stateChanged(int)), this, SLOT(chkTIRViewsChanged())); +// connect(ui.chkTIRViews, SIGNAL(stateChanged(int)), this, SLOT(chkTIRViewsChanged())); // Load the settings from the current .INI-file loadSettings(); @@ -445,7 +445,7 @@ void FTControls::loadSettings() { qDebug() << "loadSettings says: iniFile = " << currentFile; iniFile.beginGroup ( "FT" ); - ui.chkTIRViews->setChecked (iniFile.value ( "useTIRViews", 0 ).toBool()); +// ui.chkTIRViews->setChecked (iniFile.value ( "useTIRViews", 0 ).toBool()); iniFile.endGroup (); settingsDirty = false; @@ -461,7 +461,7 @@ void FTControls::save() { QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) iniFile.beginGroup ( "FT" ); - iniFile.setValue ( "useTIRViews", ui.chkTIRViews->isChecked() ); +// iniFile.setValue ( "useTIRViews", ui.chkTIRViews->isChecked() ); iniFile.endGroup (); settingsDirty = false; diff --git a/FTNoIR_Protocol_SC/FTNoIR_SCcontrols.ui b/FTNoIR_Protocol_SC/FTNoIR_SCcontrols.ui index 82cd40f2..3e7a5062 100644 --- a/FTNoIR_Protocol_SC/FTNoIR_SCcontrols.ui +++ b/FTNoIR_Protocol_SC/FTNoIR_SCcontrols.ui @@ -7,11 +7,11 @@ 0 0 346 - 180 + 104 - PPJoy settings FaceTrackNoIR + SimConnect settings FaceTrackNoIR @@ -35,7 +35,7 @@ - Virtual Joystick number: + There are no setting necessary for SimConnect Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -45,16 +45,6 @@ - - - - Select Number - - - QComboBox::InsertAlphabetically - - - diff --git a/FaceTrackNoIR.sln b/FaceTrackNoIR.sln index 27f45ef1..c4ac19ec 100644 --- a/FaceTrackNoIR.sln +++ b/FaceTrackNoIR.sln @@ -41,6 +41,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Filter_Accela", "FTN EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Protocol_VJOY", "FTNoIR_Protocol_VJOY\FTNoIR_Protocol_VJOY.vcproj", "{07E729F2-57E5-408E-A009-3501B38A621A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Tracker_Toradex", "FTNoIR_Tracker_Toradex\FTNoIR_Tracker_Toradex.vcproj", "{07B81A72-65AE-4ACF-8734-8519E8604CEC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Tracker_Arduino", "FTNoIR_Tracker_Arduino\FTNoIR_Tracker_Arduino.vcproj", "{26073935-6C44-49FD-A986-DD91FE727306}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -122,6 +126,14 @@ Global {07E729F2-57E5-408E-A009-3501B38A621A}.Debug|Win32.Build.0 = Debug|Win32 {07E729F2-57E5-408E-A009-3501B38A621A}.Release|Win32.ActiveCfg = Release|Win32 {07E729F2-57E5-408E-A009-3501B38A621A}.Release|Win32.Build.0 = Release|Win32 + {07B81A72-65AE-4ACF-8734-8519E8604CEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {07B81A72-65AE-4ACF-8734-8519E8604CEC}.Debug|Win32.Build.0 = Debug|Win32 + {07B81A72-65AE-4ACF-8734-8519E8604CEC}.Release|Win32.ActiveCfg = Release|Win32 + {07B81A72-65AE-4ACF-8734-8519E8604CEC}.Release|Win32.Build.0 = Release|Win32 + {26073935-6C44-49FD-A986-DD91FE727306}.Debug|Win32.ActiveCfg = Debug|Win32 + {26073935-6C44-49FD-A986-DD91FE727306}.Debug|Win32.Build.0 = Debug|Win32 + {26073935-6C44-49FD-A986-DD91FE727306}.Release|Win32.ActiveCfg = Release|Win32 + {26073935-6C44-49FD-A986-DD91FE727306}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/FaceTrackNoIR/FTNoIR_Curves.ui b/FaceTrackNoIR/FTNoIR_Curves.ui index c241cc42..fbe96b1c 100644 --- a/FaceTrackNoIR/FTNoIR_Curves.ui +++ b/FaceTrackNoIR/FTNoIR_Curves.ui @@ -7,7 +7,7 @@ 0 0 901 - 824 + 585 diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index da70816c..6ed3a64a 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -455,7 +455,7 @@ void FaceTrackNoIR::loadSettings() { // Put the filename in the window-title. // QFileInfo pathInfo ( currentFile ); - setWindowTitle ( "FaceTrackNoIR (1.7) - " + pathInfo.fileName() ); + setWindowTitle ( "FaceTrackNoIR (1.7 alpha 2) - " + pathInfo.fileName() ); // // Get a List of all the INI-files in the (currently active) Settings-folder. diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index 31fcff04..74fa2df5 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -23,6 +23,7 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120827 - WVR: Signal tracking = false to Curve-widget(s) when quitting run(). Also when Alternative Pitch curve is used. 20120805 - WVR: The FunctionConfig-widget is used to configure the Curves. It was tweaked some more, because the Accela filter now also uses the Curve(s). ToDo: make the ranges configurable by the user. Development on the Toradex IMU makes us realize, that a fixed input-range may not be so handy after all.. @@ -359,7 +360,15 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); // Set event ::SetEvent(m_WaitThread); - qDebug() << "Tracker::run terminated run()"; + qDebug() << "Tracker::run terminated run()"; + X.curvePtr->setTrackingActive( false ); + Y.curvePtr->setTrackingActive( false ); + Z.curvePtr->setTrackingActive( false ); + Yaw.curvePtr->setTrackingActive( false ); + Pitch.curvePtr->setTrackingActive( false ); + Pitch.curvePtrAlt->setTrackingActive( false ); + Roll.curvePtr->setTrackingActive( false ); + return; } @@ -507,9 +516,17 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); output_camera.position.x = X.invert * X.curvePtr->getValue(new_camera.position.x); output_camera.position.y = Y.invert * Y.curvePtr->getValue(new_camera.position.y); output_camera.position.z = Z.invert * Z.curvePtr->getValue(new_camera.position.z); - int altp = new_camera.position.pitch < 0; - output_camera.position.pitch = Pitch.invert * (altp ? Pitch.curvePtrAlt : Pitch.curvePtr)->getValue(new_camera.position.pitch); - ///output_camera.position.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.position.pitch); + bool altp = new_camera.position.pitch < 0; + if (altp) { + output_camera.position.pitch = Pitch.invert * Pitch.curvePtrAlt->getValue(new_camera.position.pitch); + Pitch.curvePtr->setTrackingActive( false ); + Pitch.curvePtrAlt->setTrackingActive( true ); + } + else { + output_camera.position.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.position.pitch); + Pitch.curvePtr->setTrackingActive( true ); + Pitch.curvePtrAlt->setTrackingActive( false ); + } output_camera.position.yaw = Yaw.invert * Yaw.curvePtr->getValue(new_camera.position.yaw); output_camera.position.roll = Roll.invert * Roll.curvePtr->getValue(new_camera.position.roll); @@ -518,8 +535,6 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); Y.curvePtr->setTrackingActive( true ); Z.curvePtr->setTrackingActive( true ); Yaw.curvePtr->setTrackingActive( true ); - Pitch.curvePtr->setTrackingActive( true ); - Pitch.curvePtrAlt->setTrackingActive( true ); Roll.curvePtr->setTrackingActive( true ); // -- cgit v1.2.3