diff options
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r-- | FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui | 15 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 10 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.cpp | 39 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.h | 1 |
4 files changed, 46 insertions, 19 deletions
diff --git a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui index 021c6ce6..e9f3facb 100644 --- a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui +++ b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui @@ -6,7 +6,7 @@ <rect>
<x>0</x>
<y>0</y>
- <width>672</width>
+ <width>687</width>
<height>438</height>
</rect>
</property>
@@ -682,6 +682,19 @@ </property>
</widget>
</item>
+ <item row="1" column="9">
+ <widget class="QCheckBox" name="chkDisableBeep">
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Disable Beep</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index ccd667d0..c9a05dc9 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -23,6 +23,7 @@ *********************************************************************************/
/*
Modifications (last one on top):
+ 20130201 - WVR: Load FreeTrack 2.0 protocol instead of fake TrackIR (which is now obsolete).
20130101 - WVR: Added "None" to filter-listbox to remove "use advanced filtering".
20121209 - WVR: Pre-v170 DLLs will not be added to the Listbox. Initial selection was changed (made case-insensitive).
20121014 - WVR: Added second Tracker Source for Arduino solution. The two will be mutually exclusive.
@@ -494,7 +495,7 @@ void FaceTrackNoIR::loadSettings() { // Put the filename in the window-title.
//
QFileInfo pathInfo ( currentFile );
- setWindowTitle ( "FaceTrackNoIR (1.7 alpha 10) - " + pathInfo.fileName() );
+ setWindowTitle ( "FaceTrackNoIR (1.7) - " + pathInfo.fileName() );
//
// Get a List of all the INI-files in the (currently active) Settings-folder.
@@ -543,6 +544,7 @@ void FaceTrackNoIR::loadSettings() { if (selectedProtocolName.length() == 0) {
int index = iniFile.value ( "Selection", 0 ).toInt();
switch ( index ) {
+ case TRACKIR:
case FREE_TRACK:
selectedProtocolName = QString("FTNoIR_Protocol_FT.dll");
break;
@@ -559,10 +561,6 @@ void FaceTrackNoIR::loadSettings() { selectedProtocolName = QString("FTNoIR_Protocol_FSUIPC.dll");
break;
- case TRACKIR:
- selectedProtocolName = QString("FTNoIR_Protocol_FTIR.dll");
- break;
-
case FLIGHTGEAR:
selectedProtocolName = QString("FTNoIR_Protocol_FG.dll");
break;
@@ -1920,6 +1918,7 @@ int keyindex; ui.chkCenterShift->setChecked (iniFile.value ( "Shift_Center", 0 ).toBool());
ui.chkCenterCtrl->setChecked (iniFile.value ( "Ctrl_Center", 0 ).toBool());
ui.chkCenterAlt->setChecked (iniFile.value ( "Alt_Center", 0 ).toBool());
+ ui.chkDisableBeep->setChecked (iniFile.value ( "Disable_Beep", 0 ).toBool());
// GameZero key
ui.cbxGameZeroMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_GameZero", 0 ).toInt() );
@@ -2002,6 +2001,7 @@ void KeyboardShortcutDialog::save() { iniFile.setValue ( "Shift_Center", ui.chkCenterShift->isChecked() );
iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() );
iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() );
+ iniFile.setValue ( "Disable_Beep", ui.chkDisableBeep->isChecked() );
iniFile.setValue ( "MouseKey_GameZero", ui.cbxGameZeroMouseKey->currentIndex());
iniFile.setValue ( "Keycode_GameZero", keyList.at( ui.cbxGameZeroKey->currentIndex() ) );
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index 1266ab01..1dd2cf1b 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -23,6 +23,7 @@ *********************************************************************************/
/*
Modifications (last one on top):
+ 20130201 - WVR: Remove the Protocol, when stopping the Thread.
20121215 - WVR: Fixed crash after message: protocol not installed correctly... by terminating the thread.
20120921 - WVR: Fixed centering when no filter is selected.
20120917 - WVR: Added Mouse-buttons to ShortKeys.
@@ -102,6 +103,7 @@ TShortKey Tracker::CenterKey; // ShortKey to Center headposition TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking
TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking
TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero
+bool Tracker::DisableBeep = false; // Disable beep when center
//TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking
int Tracker::CenterMouseKey; // ShortKey to Center headposition
@@ -278,6 +280,14 @@ Tracker::~Tracker() { pSecondTracker = NULL;
}
+ //
+ // Remove the Protocol
+ //
+ if (pProtocol) {
+ delete pProtocol;
+ pProtocol = NULL;
+ }
+
// Close handles
::CloseHandle(m_StopThread);
::CloseHandle(m_WaitThread);
@@ -642,7 +652,9 @@ bool bTracker2Confid = false; //
if ((Tracker::do_center) || ((bInitialCenter1 && bTracker1Confid ) || (bInitialCenter2 && bTracker2Confid))) {
- MessageBeep (MB_ICONASTERISK);
+ if (!DisableBeep) {
+ MessageBeep (MB_ICONASTERISK); // Acknowledge the key-press with a beep.
+ }
if (pTracker && bTracker1Confid) {
pTracker->notifyCenter(); // Send 'center' to the tracker
bInitialCenter1 = false;
@@ -923,9 +935,9 @@ float sum = 0; // Load the current Settings from the currently 'active' INI-file.
//
void Tracker::loadSettings() {
-int NeutralZone;
-int sensYaw, sensPitch, sensRoll;
-int sensX, sensY, sensZ;
+//int NeutralZone;
+//int sensYaw, sensPitch, sensRoll;
+//int sensX, sensY, sensZ;
qDebug() << "Tracker::loadSettings says: Starting ";
QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
@@ -938,15 +950,15 @@ int sensX, sensY, sensZ; //
// Read the Tracking settings, to fill the curves.
//
- iniFile.beginGroup ( "Tracking" );
- NeutralZone = iniFile.value ( "NeutralZone", 5 ).toInt();
- sensYaw = iniFile.value ( "sensYaw", 100 ).toInt();
- sensPitch = iniFile.value ( "sensPitch", 100 ).toInt();
- sensRoll = iniFile.value ( "sensRoll", 100 ).toInt();
- sensX = iniFile.value ( "sensX", 100 ).toInt();
- sensY = iniFile.value ( "sensY", 100 ).toInt();
- sensZ = iniFile.value ( "sensZ", 100 ).toInt();
- iniFile.endGroup ();
+ //iniFile.beginGroup ( "Tracking" );
+ //NeutralZone = iniFile.value ( "NeutralZone", 5 ).toInt();
+ //sensYaw = iniFile.value ( "sensYaw", 100 ).toInt();
+ //sensPitch = iniFile.value ( "sensPitch", 100 ).toInt();
+ //sensRoll = iniFile.value ( "sensRoll", 100 ).toInt();
+ //sensX = iniFile.value ( "sensX", 100 ).toInt();
+ //sensY = iniFile.value ( "sensY", 100 ).toInt();
+ //sensZ = iniFile.value ( "sensZ", 100 ).toInt();
+ //iniFile.endGroup ();
//
// Read the keyboard shortcuts.
@@ -959,6 +971,7 @@ int sensX, sensY, sensZ; CenterKey.shift = iniFile.value ( "Shift_Center", 0 ).toBool();
CenterKey.ctrl = iniFile.value ( "Ctrl_Center", 0 ).toBool();
CenterKey.alt = iniFile.value ( "Alt_Center", 0 ).toBool();
+ DisableBeep = iniFile.value ( "Disable_Beep", 0 ).toBool();
// StartStop key
StartStopMouseKey = iniFile.value ( "MouseKey_StartStop", 0 ).toInt();
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index 0ddd5df4..4b161293 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -188,6 +188,7 @@ private: static int StartStopMouseKey; // ShortKey to Start/stop tracking
static int InhibitMouseKey; // ShortKey to disable one or more axis during tracking
static int GameZeroMouseKey; // ShortKey to Set Game Zero
+ static bool DisableBeep; // Disable Beep when center is pressed
// Flags to start/stop/reset tracking
static bool confid; // Tracker data is OK
|