summaryrefslogtreecommitdiffhomepage
path: root/tracker-tobii-eyex/tobii-eyex.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-08 06:14:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-08 06:14:38 +0100
commit17ce3e1e69de7bd3fe06008202ae9fa2f8ff272a (patch)
tree5fcff66e72954bda7bd0d35625a730226416ad30 /tracker-tobii-eyex/tobii-eyex.hpp
parent8b7357b77fe2b3eddc59cc159da1ed26f92a1d2b (diff)
tracker/tobii: flush changes, gain is broken
Diffstat (limited to 'tracker-tobii-eyex/tobii-eyex.hpp')
-rw-r--r--tracker-tobii-eyex/tobii-eyex.hpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/tracker-tobii-eyex/tobii-eyex.hpp b/tracker-tobii-eyex/tobii-eyex.hpp
index aeac4d89..68acb25c 100644
--- a/tracker-tobii-eyex/tobii-eyex.hpp
+++ b/tracker-tobii-eyex/tobii-eyex.hpp
@@ -18,9 +18,11 @@ using namespace options;
#include "spline-widget/spline.hpp"
#include "spline-widget/spline-widget.hpp"
+#include <functional>
#include <atomic>
#include <QObject>
#include <QMutex>
+#include <QTimer>
enum tobii_mode
{
@@ -31,13 +33,27 @@ enum tobii_mode
class rel_settings final : public QObject, public opts
{
Q_OBJECT
+
+ using functor = std::function<double(double)>;
+
+ struct part
+ {
+ int nparts;
+ double len, norm;
+ functor f;
+ };
+
+ void make_spline_(part* functors, unsigned len);
+
public:
using s = slider_value;
- value<slider_value> speed, dz_end_pt, expt_slope, expt_norm, lin_norm;
+ value<slider_value> speed, dz_len, expt_slope, expt_len, expt_norm, log_slope, log_len, log_norm;
spline acc_mode_spline;
rel_settings();
-private slots:
- void draw_spline();
+ double gain(double value);
+
+public slots:
+ void make_spline();
};
struct settings final : public opts