summaryrefslogtreecommitdiff
path: root/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/tractyl_manuform/tractyl_manuform.c')
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
index 0ae49b6397..d3e2e02975 100644
--- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
@@ -159,10 +159,8 @@ void charybdis_set_pointer_dragscroll_enabled(bool enable) {
maybe_update_pointing_device_cpi(&g_charybdis_config);
}
-void pointing_device_init_kb(void) { maybe_update_pointing_device_cpi(&g_charybdis_config); }
-
# ifndef CONSTRAIN_HID
-# define CONSTRAIN_HID(value) ((value) < -127 ? -127 : ((value) > 127 ? 127 : (value)))
+# define CONSTRAIN_HID(value) ((value) < XY_REPORT_MIN ? XY_REPORT_MIN : ((value) > XY_REPORT_MAX ? XY_REPORT_MAX : (value)))
# endif // !CONSTRAIN_HID
/**
@@ -249,17 +247,17 @@ static bool has_shift_mod(void) {
*/
__attribute__((unused)) static void debug_charybdis_config_to_console(charybdis_config_t* config) {
# ifdef CONSOLE_ENABLE
- dprintf("(charybdis) process_record_kb: config = {\n"
- "\traw = 0x%04X,\n"
- "\t{\n"
- "\t\tis_dragscroll_enabled=%b\n"
- "\t\tis_sniping_enabled=%b\n"
- "\t\tdefault_dpi=0x%02X (%ld)\n"
- "\t\tsniping_dpi=0x%01X (%ld)\n"
- "\t}\n"
- "}\n",
- config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config));
-# endif // CONSOLE_ENABLE
+ IGNORE_FORMAT_WARNING(dprintf("(charybdis) process_record_kb: config = {\n"
+ "\traw = 0x%04X,\n"
+ "\t{\n"
+ "\t\tis_dragscroll_enabled=%b\n"
+ "\t\tis_sniping_enabled=%b\n"
+ "\t\tdefault_dpi=0x%02X (%ld)\n"
+ "\t\tsniping_dpi=0x%01X (%ld)\n"
+ "\t}\n"
+ "}\n",
+ config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)));
+# endif // CONSOLE_ENABLE
}
bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
@@ -339,6 +337,7 @@ void charybdis_config_sync_handler(uint8_t initiator2target_buffer_size, const v
}
void keyboard_post_init_kb(void) {
+ maybe_update_pointing_device_cpi(&g_charybdis_config);
transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, charybdis_config_sync_handler);
keyboard_post_init_user();