summaryrefslogtreecommitdiffhomepage
path: root/tracker-tobii-eyex/tobii-eyex.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-07 12:19:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-19 15:11:00 +0200
commitfd86eebdd12158d80e4af190e7e7a474b410ce5a (patch)
tree1eefa4060ed1dcf1f8f21c183054ca963f7c8855 /tracker-tobii-eyex/tobii-eyex.hpp
parentb367b4c39090735ddf40df757ae381f4b4fe13cb (diff)
tracker/tobii: remove existing mapping code. maybe later revert this.
It doesn't work good enough. Try use splines instead.
Diffstat (limited to 'tracker-tobii-eyex/tobii-eyex.hpp')
-rw-r--r--tracker-tobii-eyex/tobii-eyex.hpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/tracker-tobii-eyex/tobii-eyex.hpp b/tracker-tobii-eyex/tobii-eyex.hpp
index d8bb3606..f64f2495 100644
--- a/tracker-tobii-eyex/tobii-eyex.hpp
+++ b/tracker-tobii-eyex/tobii-eyex.hpp
@@ -16,7 +16,7 @@
using namespace options;
#include "opentrack-compat/timer.hpp"
#include "spline-widget/functionconfig.h"
-#include "spline-widget/qfunctionconfigurator.h"
+#include "qfunctionconfigurator.h"
#include <atomic>
#include <QObject>
@@ -28,17 +28,19 @@ enum tobii_mode
tobii_absolute,
};
-struct rel_settings : public QObject, public opts
+class rel_settings final : public QObject, public opts
{
+ Q_OBJECT
+public:
using s = slider_value;
- value<slider_value> speed, dz_end_pt, expt_val, log_base;
+ value<slider_value> speed, dz_end_pt, expt_slope, expt_norm, lin_norm;
+ Map acc_mode_spline;
rel_settings();
-private:
- // linear coefficient to be the same as exponent
- Map spline;
+private slots:
+ void draw_spline();
};
-struct settings : public opts
+struct settings final : public opts
{
value<tobii_mode> mode;
settings() :
@@ -75,11 +77,6 @@ private:
using num = double;
- template<typename funs_seq, typename bounds_seq>
- static num piecewise(num x, const funs_seq& funs, const bounds_seq& bounds);
-
- using fun_t = std::function<num(num)>;
-
num gain(num x);
settings s;