1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#pragma once
#include "options/options.hpp"
using namespace options;
#include "spline-widget/spline.hpp"
struct settings_accela : opts
{
static constexpr double rot_gains[16][2] =
{
{ 12, 500 },
{ 11, 450 },
{ 10, 400 },
{ 9, 350 },
{ 8, 300 },
{ 7, 250 },
{ 6, 200 },
{ 2.66, 50 },
{ 1.66, 17 },
{ 1, 4 },
{ .5, .53 },
{ 0, 0 },
{ -1, 0 }
};
static constexpr double trans_gains[16][2] =
{
{ 12, 400 },
{ 11, 350 },
{ 10, 300 },
{ 9, 250 },
{ 8, 200 },
{ 7, 150 },
{ 5, 80 },
{ 3, 32 },
{ 2, 10 },
{ 1.66, 6 },
{ 1.33, 3 },
{ .66, 1 },
{ .33, .5 },
{ 0, 0 },
{ -1, 0 }
};
static void make_splines(spline& rot, spline& trans);
value<slider_value> rot_sensitivity, trans_sensitivity;
value<slider_value> rot_deadzone, trans_deadzone;
value<slider_value> ewma;
value<slider_value> rot_nonlinearity;
settings_accela() :
opts("accela-sliders"),
rot_sensitivity(b, "rotation-sensitivity", slider_value(1.5, .05, 5)),
trans_sensitivity(b, "translation-sensitivity", slider_value(1., .05, 1.5)),
rot_deadzone(b, "rotation-deadzone", slider_value(.03, 0, 2)),
trans_deadzone(b, "translation-deadzone", slider_value(.1, 0, 1)),
ewma(b, "ewma", slider_value(0, 0, 30)),
rot_nonlinearity(b, "rotation-nonlinearity", slider_value(1.2, 1, 1.5))
{}
};
|