diff options
| author | a1xd <[email protected]> | 2021-04-13 23:59:21 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-04-13 23:59:21 -0400 |
| commit | a6926be0e911b7b7637861866f41c3bca31a87a3 (patch) | |
| tree | a8d7cd5afb4c093e6f97e8d772b139dd5d749988 /common/rawaccel-base.hpp | |
| parent | additional fixes (diff) | |
| download | rawaccel-a6926be0e911b7b7637861866f41c3bca31a87a3.tar.xz rawaccel-a6926be0e911b7b7637861866f41c3bca31a87a3.zip | |
move arbitrary input into settings
separate arbitrary mode from spaced modes, arbitrary now deserializes from default settings file
Diffstat (limited to 'common/rawaccel-base.hpp')
| -rw-r--r-- | common/rawaccel-base.hpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/common/rawaccel-base.hpp b/common/rawaccel-base.hpp index 2f49ec0..c1b2db3 100644 --- a/common/rawaccel-base.hpp +++ b/common/rawaccel-base.hpp @@ -16,6 +16,7 @@ namespace rawaccel { inline constexpr size_t MAX_DEV_ID_LEN = 200; inline constexpr size_t SPACED_LUT_CAPACITY = 1025; + inline constexpr size_t ARB_LUT_CAPACITY = SPACED_LUT_CAPACITY / 4; inline constexpr double MAX_NORM = 16; inline constexpr double PI = 3.14159265358979323846; @@ -24,21 +25,20 @@ namespace rawaccel { classic, jump, natural, - power, motivity, - lookuptable, + power, + arb_lookup, noaccel }; - enum class table_mode { + enum class spaced_lut_mode { off, binlog, - linear, - arbitrary + linear }; - struct table_args { - table_mode mode = table_mode::off; + struct spaced_lut_args { + spaced_lut_mode mode = spaced_lut_mode::off; bool transfer = true; unsigned char partitions = 2; short num_elements = 8; @@ -46,12 +46,16 @@ namespace rawaccel { double stop = 8; }; + struct table_args { + bool velocity = true; + int length = 0; + vec2<float> data[ARB_LUT_CAPACITY] = {}; + }; + struct accel_args { accel_mode mode = accel_mode::noaccel; bool legacy = false; - table_args lut_args = {}; - double offset = 0; double cap = 1.5; double accel_classic = 0.005; @@ -65,6 +69,9 @@ namespace rawaccel { double limit = 1.5; double midpoint = 5; double smooth = 0.5; + + spaced_lut_args spaced_args; + table_args arb_args; }; struct domain_args { |