From 0c74892e9080e17db637a31d421f920862baaaef Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 2 Jul 2022 06:58:40 -0700 Subject: [Keyboard] Update Charybdis code for Extended Mouse reports (#17435) --- keyboards/handwired/tractyl_manuform/tractyl_manuform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'keyboards/handwired/tractyl_manuform/tractyl_manuform.c') diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c index 0ae49b6397..c68234d8d8 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 /** @@ -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(); -- cgit v1.2.3 From 643f6367a19649a0f5af6d43f2ed7f0e93b21f70 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 7 Jul 2022 14:14:09 +0200 Subject: [Fix] Patches after printf library update (#17584) * Add missing '(' to print_bin_reverse32 declaration * Fix insufficient character buffers on satisfaction75 * Remove \0 character in format string and use corrected offset math instead on rocketboard 16 * Replace snprintf_ with snprintf for djinn * Explicitly ignore format checks for tracktyl manuform that uses %b specifier * Print properly escaped version string in command.c, as PRODUCT or other defines can contain constructs like 'Vendor keyboard 66%' which will be interpreted as a format specifier --- .../handwired/tractyl_manuform/tractyl_manuform.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'keyboards/handwired/tractyl_manuform/tractyl_manuform.c') diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c index c68234d8d8..d3e2e02975 100644 --- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c @@ -247,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) { -- cgit v1.2.3