summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/ftnoir_tracker_hat_settings.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-04-29 11:30:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-04-29 11:30:37 +0200
commit38dd6e55d20adfd830d834c394fc6ce7373a4805 (patch)
tree0a94bf051ff0bc153abebaa74e474748c2d4d8a6 /tracker-hatire/ftnoir_tracker_hat_settings.h
parent4db6f6334d13ed5e8696dfa0208b42b3e9a2352a (diff)
tracker/hatire: move io to a separate thread
We can't have async io on the main thread because QSerialPort's readyRead() signal can fire constantly, thus consuming all CPU time. We can't sleep in the main thread either as that blocks too many things. We can't ignore readyRead() invocations over a threshold as that'll make us lose some of data notifications. Refactor hatire to put IO on a thread. Since this is a separate Qt event loop, we may sleep in there. Further, add a debug mode reading data from a file, as if it came from a serial-attached device. Issue: #327
Diffstat (limited to 'tracker-hatire/ftnoir_tracker_hat_settings.h')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat_settings.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat_settings.h b/tracker-hatire/ftnoir_tracker_hat_settings.h
index ade46d54..bed33200 100644
--- a/tracker-hatire/ftnoir_tracker_hat_settings.h
+++ b/tracker-hatire/ftnoir_tracker_hat_settings.h
@@ -5,12 +5,10 @@
* copyright notice and this permission notice appear in all copies.
*/
-#ifndef FTNOIR_TRACKER_HAT_SETTINGS_H
-#define FTNOIR_TRACKER_HAT_SETTINGS_H
+#pragma once
#include <QtSerialPort/QSerialPort>
-//-----------------------------------------------------------------------------
struct TrackerSettings
{
void load_ini();
@@ -30,7 +28,6 @@ struct TrackerSettings
bool InvertY;
bool InvertZ;
-
int RollAxe;
int PitchAxe;
int YawAxe;
@@ -59,10 +56,5 @@ struct TrackerSettings
QSerialPort::StopBits pStopBits;
QSerialPort::FlowControl pFlowControl;
-#ifdef OPENTRACK_API
int FPSArduino;
-#endif
};
-
-
-#endif //FTNOIR_TRACKER_HAT_SETTINGS_H