summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-02 19:24:33 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-02 19:26:01 +0100
commitdb821b0a81962c0a01264930b628c143b0e62b6c (patch)
treecae7bb1c3a2e9933b1196b8bf589189dcc31dc3b /opentrack
parente54e20e2c5eeeaff23f9ebcb6cdaa7428683f358 (diff)
simplify ctor
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/mappings.hpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/opentrack/mappings.hpp b/opentrack/mappings.hpp
index 7f949f2d..1a64fcd9 100644
--- a/opentrack/mappings.hpp
+++ b/opentrack/mappings.hpp
@@ -12,13 +12,10 @@ class Mapping {
public:
Mapping(QString primary,
QString secondary,
- int maxInput1,
- int maxOutput1,
- int maxInput2,
- int maxOutput2,
+ int max_value,
axis_opts& opts) :
- curve(maxInput1, maxOutput1),
- curveAlt(maxInput2, maxOutput2),
+ curve(max_value, max_value),
+ curveAlt(max_value, max_value),
opts(opts),
name1(primary),
name2(secondary)
@@ -42,12 +39,12 @@ private:
public:
Mappings(std::vector<axis_opts*> opts) :
axes {
- Mapping("tx","tx_alt", 100, 100, 100, 100, *opts[TX]),
- Mapping("ty","ty_alt", 100, 100, 100, 100, *opts[TY]),
- Mapping("tz","tz_alt", 100, 100, 100, 100, *opts[TZ]),
- Mapping("rx", "rx_alt", 180, 180, 180, 180, *opts[Yaw]),
- Mapping("ry", "ry_alt", 180, 180, 180, 180, *opts[Pitch]),
- Mapping("rz", "rz_alt", 180, 180, 180, 180, *opts[Roll])
+ Mapping("tx","tx_alt", 100, *opts[TX]),
+ Mapping("ty","ty_alt", 100, *opts[TY]),
+ Mapping("tz","tz_alt", 100, *opts[TZ]),
+ Mapping("rx", "rx_alt", 180, *opts[Yaw]),
+ Mapping("ry", "ry_alt", 180, *opts[Pitch]),
+ Mapping("rz", "rz_alt", 180, *opts[Roll])
}
{}