From 5b659e1cfbc4b8fbbd2f2bf41dc716929976c77d Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Sat, 28 Aug 2021 01:19:18 -0400 Subject: add per-device configuration adds input and [in, out] cap for classic mode adds input cap for power mode change wrapper/input, now gets useful device names change (now dev specific) dpi to adjust sensitivity change y sensitivity to y/x ratio remove spaced LUTs grapher and convert do not build --- common/accel-natural.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'common/accel-natural.hpp') diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 9f76d1a..c5e1c32 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -18,11 +18,15 @@ namespace rawaccel { { accel = args.decay_rate / fabs(limit); } + }; - struct natural_legacy : natural_base { + template struct natural; + + template<> + struct natural : natural_base { - double operator()(double x) const + double operator()(double x, const accel_args&) const { if (x <= offset) return 1; @@ -34,10 +38,11 @@ namespace rawaccel { using natural_base::natural_base; }; - struct natural : natural_base { + template<> + struct natural : natural_base { double constant; - double operator()(double x) const + double operator()(double x, const accel_args&) const { if (x <= offset) return 1; @@ -50,6 +55,7 @@ namespace rawaccel { natural(const accel_args& args) : natural_base(args), constant(-limit / accel) {} - }; + natural() = default; + }; } -- cgit v1.2.3 From 6a9272d3af202274dfbced245f0ba20b263fcd8b Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Fri, 3 Sep 2021 18:09:00 -0400 Subject: refactor vec2/math --- common/accel-natural.hpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'common/accel-natural.hpp') diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index c5e1c32..521a1ae 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -2,8 +2,6 @@ #include "rawaccel-base.hpp" -#include - namespace rawaccel { /// Struct to hold "natural" (vanishing difference) acceleration implementation. -- cgit v1.2.3 From 864ef4d74b4f2709c8df216c5197b299389a8926 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Wed, 8 Sep 2021 03:01:43 -0400 Subject: fix clang build errors --- common/accel-natural.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'common/accel-natural.hpp') diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 521a1ae..6f30a38 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -54,6 +54,5 @@ namespace rawaccel { natural_base(args), constant(-limit / accel) {} - natural() = default; }; } -- cgit v1.2.3 From 115030165d539fde5440f6232879c7a076dea2ec Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Sat, 18 Sep 2021 05:20:53 -0400 Subject: generalize power start-from-1 starting output is determined by (gain) offset --- common/accel-natural.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/accel-natural.hpp') diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 6f30a38..9d615a9 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -11,7 +11,7 @@ namespace rawaccel { double limit; natural_base(const accel_args& args) : - offset(args.offset), + offset(args.input_offset), limit(args.limit - 1) { accel = args.decay_rate / fabs(limit); -- cgit v1.2.3