summaryrefslogtreecommitdiff
path: root/users/drashna/pointing
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@drashna.net>2023-02-28 11:14:48 -0800
committerGitHub <noreply@github.com>2023-02-28 11:14:48 -0800
commit051401175d98e777a6633445a0275b54ed36e97a (patch)
tree325d717dfbfb12e4cb45c02089602f256ddc36d6 /users/drashna/pointing
parent05631b276d557824518cdb0c7d5d78c8f118891c (diff)
[Keymap] Drashna updates for 0.20.0 (#19960)
Diffstat (limited to 'users/drashna/pointing')
-rw-r--r--users/drashna/pointing/pointing.c11
-rw-r--r--users/drashna/pointing/pointing_config.h6
2 files changed, 12 insertions, 5 deletions
diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c
index a74c9fd41e..18dad0da81 100644
--- a/users/drashna/pointing/pointing.c
+++ b/users/drashna/pointing/pointing.c
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "pointing.h"
+#include "math.h"
static uint16_t mouse_debounce_timer = 0;
bool enable_acceleration = false;
@@ -38,8 +39,10 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
oled_timer_reset();
#endif
if (enable_acceleration) {
- x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
- y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
+ x = (mouse_xy_report_t)(x > 0 ? pow(4, x) / 2 + x : -pow(4, abs(x)) / 2 + x);
+ y = (mouse_xy_report_t)(y > 0 ? pow(5, y) / 2 + y : -pow(5, abs(y)) / 2 + y);
+// x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
+// y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
}
mouse_report.x = x;
mouse_report.y = y;
@@ -81,9 +84,7 @@ bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record) {
switch (keycode) {
# if defined(KEYBOARD_ploopy)
case DPI_CONFIG:
-# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES)
- case QK_KB ... QK_KB_MAX:
-# elif (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
+# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES) || (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
case QK_KB ... QK_KB_MAX:
# endif
case KC_ACCEL:
diff --git a/users/drashna/pointing/pointing_config.h b/users/drashna/pointing/pointing_config.h
new file mode 100644
index 0000000000..50c29ede85
--- /dev/null
+++ b/users/drashna/pointing/pointing_config.h
@@ -0,0 +1,6 @@
+// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define POINTING_DEVICE_MODES_ENABLE