summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-13 07:55:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-13 07:55:51 +0200
commit458335e772b7ad790954351859d9f754a797bd80 (patch)
tree8606ae339d05650d6e927d415e3151dace6fd3c3 /facetracknoir
parent7fd80129f3961465ce485a6ab7d873005b9c9427 (diff)
Fix alt axes, finally
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/facetracknoir.cpp36
-rw-r--r--facetracknoir/tracker.cpp6
-rw-r--r--facetracknoir/tracker.h4
3 files changed, 29 insertions, 17 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index c19585b2..41c456ce 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -751,18 +751,20 @@ void FaceTrackNoIR::startTracker( ) {
}
static const char* names[] = {
+ "tx_alt",
+ "ty_alt",
+ "tz_alt",
"rx_alt",
"ry_alt",
"rz_alt",
- "tx_alt",
- "ty_alt",
- "tz_alt"
};
+ iniFile.beginGroup("Tracking");
+
for (int i = 0; i < 6; i++)
- {
GlobalPose->axes[i].altp = iniFile.value(names[i], false).toBool();
- }
+
+ iniFile.endGroup();
tracker = new Tracker ( this );
@@ -1942,24 +1944,28 @@ void CurveConfigurationDialog::loadSettings() {
qDebug() << "loadSettings says: iniFile = " << currentFile;
static const char* names[] = {
- "rx_alt",
- "ry_alt",
- "rz_alt",
"tx_alt",
"ty_alt",
- "tz_alt"
+ "tz_alt",
+ "rx_alt",
+ "ry_alt",
+ "rz_alt"
};
+ iniFile.beginGroup("Tracking");
+
for (int i = 0; i < 6; i++)
GlobalPose->axes[i].altp = iniFile.value(names[i], false).toBool();
+ iniFile.endGroup();
+
static QCheckBox* widgets[] = {
- ui.rx_altp,
- ui.ry_altp,
- ui.rz_altp,
ui.tx_altp,
ui.ty_altp,
- ui.tz_altp
+ ui.tz_altp,
+ ui.rx_altp,
+ ui.ry_altp,
+ ui.rz_altp
};
for (int i = 0; i < 6; i++)
@@ -1995,6 +2001,8 @@ void CurveConfigurationDialog::save() {
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ iniFile.beginGroup("Tracking");
+
iniFile.setValue("rx_alt", ui.rx_altp->checkState() != Qt::Unchecked);
iniFile.setValue("ry_alt", ui.ry_altp->checkState() != Qt::Unchecked);
iniFile.setValue("rz_alt", ui.rz_altp->checkState() != Qt::Unchecked);
@@ -2002,6 +2010,8 @@ void CurveConfigurationDialog::save() {
iniFile.setValue("ty_alt", ui.ty_altp->checkState() != Qt::Unchecked);
iniFile.setValue("tz_alt", ui.tz_altp->checkState() != Qt::Unchecked);
+ iniFile.endGroup();
+
settingsDirty = false;
//
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index e6dde008..ca7d71fb 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -336,12 +336,12 @@ void Tracker::loadSettings() {
Z_PosWhenReverseAxis = iniFile.value ( "RA_ToZPos", 80 ).toInt();
static const char* names[] = {
- "Inhibit_Yaw",
- "Inhibit_Pitch",
- "Inhibit_Roll",
"Inhibit_X",
"Inhibit_Y",
"Inhibit_Z"
+ "Inhibit_Yaw",
+ "Inhibit_Pitch",
+ "Inhibit_Roll",
};
for (int i = 0; i < 6; i++)
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
index 5dc48f60..8bf1f6dc 100644
--- a/facetracknoir/tracker.h
+++ b/facetracknoir/tracker.h
@@ -117,10 +117,12 @@ public:
{
curvePtrAlt = new FunctionConfig(secondary, maxInput2, maxOutput2);
curvePtrAlt->loadSettings(iniFile);
+ iniFile.beginGroup("Tracking");
+ altp = iniFile.value(secondary).toBool();
+ iniFile.endGroup();
}
headPos = 0.0f;
invert = 1;
- altp = false;
}
float headPos; // Current position (from faceTracker, radials or meters)
float invert; // Invert measured value (= 1.0f or -1.0f)