From 16dc4df3d438142ae378c9c6983585d06e0c6a33 Mon Sep 17 00:00:00 2001
From: a1xd <68629610+a1xd@users.noreply.github.com>
Date: Mon, 29 Mar 2021 17:14:49 -0400
Subject: refactor common/settings
only driver compiles
remove accel-base types
merge linear + classic
move gain cap logic into classic impl, cap is now set in terms of output
use cap/limit to determine negation
remove weight, add replacement for power mode only
remove legacy offset option
remove naturalgain mode
add legacy mode flag
naturalgain -> natural
natural -> natural + legacy flag
add dpi setting and more accel args + defaults (prep for ips mode)
replace output speed cap with input cap
---
common/accel-linear.hpp | 31 -------------------------------
1 file changed, 31 deletions(-)
delete mode 100644 common/accel-linear.hpp
(limited to 'common/accel-linear.hpp')
diff --git a/common/accel-linear.hpp b/common/accel-linear.hpp
deleted file mode 100644
index 2bd57b8..0000000
--- a/common/accel-linear.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#pragma once
-
-#include "accel-base.hpp"
-
-namespace rawaccel {
-
- /// Struct to hold linear acceleration implementation.
- struct linear_impl {
- double accel;
- double offset;
- double subtractive_const;
- double divisive_const;
-
- linear_impl(const accel_args& args) : accel(args.accel), offset(args.offset) {
- subtractive_const = 2 * accel * offset;
- divisive_const = accel * offset * offset;
- }
-
- inline double operator()(double speed) const {
- double base_speed = speed + offset;
- return accel * base_speed - subtractive_const + divisive_const / base_speed;
- }
-
- inline double legacy_offset(double speed) const {
- return accel * speed;
- }
- };
-
- using accel_linear = additive_accel;
-
-}
--
cgit v1.2.3