diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-31 21:04:44 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-31 21:04:44 +0100 |
commit | d971b9d699f7862b4c9414abfdb64445f4be9018 (patch) | |
tree | f61d31339f1d824b213979d4cabd5b20cdf5358b /tracker-tobii-eyex/tobii-settings.hpp | |
parent | 74253af3f832df22a742761a5f5a1454f1cc3c9b (diff) |
tracker/tobii: set up settings for prototype vesion
The initial version won't have a generalized spline
with multiple parameters to configure the gain. But
it's doable in one go unlike a fully-fledged version
from the start.
Diffstat (limited to 'tracker-tobii-eyex/tobii-settings.hpp')
-rw-r--r-- | tracker-tobii-eyex/tobii-settings.hpp | 55 |
1 files changed, 20 insertions, 35 deletions
diff --git a/tracker-tobii-eyex/tobii-settings.hpp b/tracker-tobii-eyex/tobii-settings.hpp index 08e05ecf..cfdfa65c 100644 --- a/tracker-tobii-eyex/tobii-settings.hpp +++ b/tracker-tobii-eyex/tobii-settings.hpp @@ -1,51 +1,36 @@ #pragma once -#include "api/plugin-api.hpp" #include "options/options.hpp" using namespace options; -#include "spline/spline.hpp" -#include "spline/spline-widget.hpp" - -#include <functional> - -#include <QObject> enum tobii_mode { - tobii_relative, - tobii_absolute, + tobii_snap = 0xf00d, + tobii_acc = 0xacc, }; -class rel_settings final : public QObject, public opts +enum max_yaw { - Q_OBJECT - - using functor = std::function<double(double)>; - - struct part - { - double len; - functor f; - }; - - void make_spline_(part* functors, unsigned len); - -public: - using s = slider_value; - value<slider_value> speed, dz_len, expt_slope, expt_len, expt_norm, log_len; - spline acc_mode_spline; - rel_settings(); - double gain(double value); + y10, y15, y20, y30, y45, +}; -public slots: - void make_spline(); +enum max_pitch +{ + p10, p15, p25, p35, }; struct settings final : public opts { - value<tobii_mode> mode; - settings() : - opts("tobii-eyex"), - mode(b, "mode", tobii_relative) - {} + value<tobii_mode> mode { b, "mode", tobii_snap }; + + value<slider_value> snap_speed { b, "snap-speed", slider_value(.1, .05, 1) }, + snap_inv_dz { b, "snap-screen-edge-length", slider_value(.35, .1, .5) }; + value<slider_value> acc_speed { b, "acc-speed", slider_value(.1, .05, 1) }, + acc_dz_len { b, "acc-screen-edge-length", slider_value(.1, .1, 1) }; + value<max_yaw> snap_yaw { b, "snap-max-yaw", y20 }, + acc_yaw { b, "acc-max-yaw", y20 }; + value<max_pitch> snap_pitch { b, "snap-max-pitch", p15 }, + acc_pitch { b, "acc-max-pitch", p15 }; + + settings() : opts("tobii-eyex") {} }; |