From 9d801cb03db7d5f11d1b82a22f401e30c343d0ee Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 28 Dec 2021 20:25:06 -0800 Subject: [Keyboard] Update Tractyl Manuform to use Split Pointing Device Sync --- users/drashna/oled/oled_stuff.c | 13 +++++++------ users/drashna/oled/oled_stuff.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'users/drashna') diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c index 9ee2cbfed8..8894814985 100644 --- a/users/drashna/oled/oled_stuff.c +++ b/users/drashna/oled/oled_stuff.c @@ -348,9 +348,8 @@ void render_wpm(uint8_t padding) { #endif } -#if defined(KEYBOARD_handwired_tractyl_manuform) || defined(KEYBOARD_bastardkb_charybdis) -extern kb_config_data_t kb_config; -void render_pointing_dpi_status(uint8_t padding) { +#if defined(POINTING_DEVICE_ENABLE) +void render_pointing_dpi_status(uint16_t cpi, uint8_t padding) { oled_write_P(PSTR("CPI:"), false); if (padding) { for (uint8_t n = padding - 1; n > 0; n--) { @@ -358,7 +357,7 @@ void render_pointing_dpi_status(uint8_t padding) { } } - oled_write(get_u16_str(kb_config.device_cpi, ' '), false); + oled_write(get_u16_str(cpi, ' '), false); } #endif @@ -381,8 +380,10 @@ __attribute__((weak)) void oled_driver_render_logo_left(void) { render_wpm(0); # endif oled_write_P(PSTR(" "), false); -# if defined(KEYBOARD_handwired_tractyl_manuform) || defined(KEYBOARD_bastardkb_charybdis) - render_pointing_dpi_status(1); +# if defined(KEYBOARD_handwired_tractyl_manuform) + render_pointing_dpi_status(kb_config_data.device_cpi, 1); +# elif defined(KEYBOARD_bastardkb_charybdis) + render_pointing_dpi_status(, 1); # endif oled_set_cursor(0, 4); #else diff --git a/users/drashna/oled/oled_stuff.h b/users/drashna/oled/oled_stuff.h index 8795684d6a..fd64b50874 100644 --- a/users/drashna/oled/oled_stuff.h +++ b/users/drashna/oled/oled_stuff.h @@ -33,7 +33,7 @@ void render_bootmagic_status(void); void render_user_status(void); void oled_driver_render_logo(void); void render_wpm(uint8_t padding); -void render_pointing_dpi_status(uint8_t padding); +void render_pointing_dpi_status(uint16_t cpi, uint8_t padding); void oled_driver_render_logo_left(void); void oled_driver_render_logo_right(void); -- cgit v1.2.3 From d1cf218b9dad0d35413349e7b78ff21612958579 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 30 Jan 2022 13:29:43 -0800 Subject: [Keyboard] Overhaul Tractyl Manuform (#16134) --- users/drashna/oled/oled_stuff.c | 2 +- users/drashna/pointing/pointing.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'users/drashna') diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c index c850c5336f..752829e0fa 100644 --- a/users/drashna/oled/oled_stuff.c +++ b/users/drashna/oled/oled_stuff.c @@ -953,7 +953,7 @@ void oled_driver_render_logo_left(void) { render_matrix_scan_rate(2); # endif oled_set_cursor(7, 2); -# if defined(KEYBOARD_bastardkb_charybdis) +# if defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform) render_pointing_dpi_status(charybdis_get_pointer_sniping_enabled() ? charybdis_get_pointer_sniping_dpi() : charybdis_get_pointer_default_dpi(), 1); // credit and thanks to jaspertandy on discord for these images diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c index 0dcfe73f34..d0a83e2c26 100644 --- a/users/drashna/pointing/pointing.c +++ b/users/drashna/pointing/pointing.c @@ -80,9 +80,9 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { } break; case MO(_MOUSE): -#if defined(KEYBOARD_ploopy) || defined(KEYBOARD_handwired_tractyl_manuform) +#if defined(KEYBOARD_ploopy) case DPI_CONFIG: -#elif defined(KEYBOARD_bastardkb_charybdis) && !defined(NO_CHARYBDIS_KEYCODES) +#elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES) case SAFE_RANGE ... (CHARYBDIS_SAFE_RANGE-1): #endif case KC_MS_UP ... KC_MS_WH_RIGHT: -- cgit v1.2.3