From a0fed0ea176d1c986e40fc4981b900509c90d66e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 May 2021 23:17:32 -0700 Subject: Convert Encoder callbacks to be boolean functions (#12805) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/ungodly/launch_pad/keymaps/default/keymap.c | 3 ++- keyboards/ungodly/nines/nines.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c index 4ddec6c429..880b225d43 100644 --- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -92,12 +92,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return true; } uint8_t divisor = 0; diff --git a/keyboards/ungodly/nines/nines.c b/keyboards/ungodly/nines/nines.c index 3b29b268d7..08f8a9ad74 100644 --- a/keyboards/ungodly/nines/nines.c +++ b/keyboards/ungodly/nines/nines.c @@ -15,7 +15,8 @@ */ #include "nines.h" -__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) return false; if (index == 0) { /* Left encoder */ if (clockwise) { tap_code(KC_VOLU); @@ -29,4 +30,5 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_VOLD); } } + return true; } -- cgit v1.2.3 From 7907a725846720b96833057e94b548c38fcd0116 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 24 Jul 2021 02:36:41 -0700 Subject: [Keyboard] Reduce compile size for dz60rgb v2.1 (#13680) --- keyboards/ungodly/launch_pad/config.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index c4da097601..d6db419774 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -46,6 +46,7 @@ /* RGB Matrix configuration */ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES +# define DRIVER_LED_TOTAL 22 #endif #define RGB_DI_PIN F7 @@ -58,10 +59,6 @@ # define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ # define RGBLIGHT_ANIMATIONS -// RGB Matrix -# ifdef RGB_MATRIX_ENABLE -# define DRIVER_LED_TOTAL RGBLED_NUM -# endif #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -- cgit v1.2.3 From 210da7b233f1e61d958b64ad77fbc026667cc495 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 24 Jul 2021 18:05:19 -0700 Subject: [Keyboard] Fix Compile size on ungodly Launch Pad (#13692) --- keyboards/ungodly/launch_pad/config.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index d6db419774..e4e14ad687 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -46,6 +46,14 @@ /* RGB Matrix configuration */ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DRIVER_LED_TOTAL 22 #endif -- cgit v1.2.3 From 3affdcb45b51641b2a5d918c69f3afe2b2f5c757 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 26 Jul 2021 19:41:28 -0700 Subject: Reduce firmware size in prep for #12670 (#13724) * Reduce firmware size in pre for #12670 * Also disable pixel mode, just in case --- keyboards/ungodly/launch_pad/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index e4e14ad687..0b6d03801e 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -54,6 +54,9 @@ # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_PIXEL_FLOW +# define DISABLE_RGB_MATRIX_PIXEL_FRACTAL +# define DISABLE_RGB_MATRIX_PIXEL_RAIN # define DRIVER_LED_TOTAL 22 #endif -- cgit v1.2.3 From a03aa301def77c867ae6c6c840f7fc82b26d91d6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 6 Aug 2021 23:59:56 -0700 Subject: Remove Full Bootmagic (#13846) * disambiguate Bootmagic rules in keymaps The files edited by this commit were added at a point in time where `BOOTMAGIC_ENABLE = yes` enabled full Bootmagic. This commit edits the files to specify that full Bootmagic is intended. * remove BOOTMAGIC_ENABLE=full setting * unify commented BOOTMAGIC_ENABLE rules in keyboards Explicitly sets `BOOTMAGIC_ENABLE = no` in keyboards where the rule was commented out. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-zA-Z]\+\).*;\1 = no # Virtual DIP switch configuration;g' {} + ``` * remove commented Bootmagic rules from keymap/user level Command: ``` find keyboards/ layouts/ users/ -type f -name 'rules.mk' -exec sed -i -e '/#.*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*/d' {} + ``` * update keyboard BOOTMAGIC_ENABLE rule formatting Sets the formatting of BOOTMAGIC_ENABLE rules to `BOOTMAGIC_ENABLE = [value]`, without the inline comments (which will be replaced later). Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + ``` * update keyboards' BOOTMAGIC_ENABLE settings Updates keyboard `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = \)full;\1lite;g' '{}' + ``` * update keymap/user BOOTMAGIC_ENABLE settings Updates keymap/user `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + ``` * remove and replace inline comments in keyboards and keymap/user files Removes and replaces the inline comments, which have been updated to read `Enable Bootmagic Lite`. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = lite\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = yes\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = no\);\1 # Enable Bootmagic Lite;g' '{}' + ``` * rename improperly named makefiles Some files intended to be used as makefiles had improper names causing them to not be used as intended when building. This commit corrects the filenames of the affected files. * update renamed file with new rule formatting * update QMK's template files Updates QMK's `rules.mk` templates to use the new inline comment. * update QMK Docs - remove documentation of full Bootmagic - update links to Bootmagic Lite doc - add doc for Magic Keycodes * rules.mk patch for coarse/ixora and coarse/vinta --- keyboards/ungodly/launch_pad/rules.mk | 2 +- keyboards/ungodly/nines/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk index 298ee450cb..1b796bbfe1 100644 --- a/keyboards/ungodly/launch_pad/rules.mk +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ungodly/nines/rules.mk b/keyboards/ungodly/nines/rules.mk index c8cbaf06bf..5bb16c5c28 100644 --- a/keyboards/ungodly/nines/rules.mk +++ b/keyboards/ungodly/nines/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -- cgit v1.2.3 From 041ff26ff19ed95433a6f9ea17be02b5bca446e1 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 13 Aug 2021 11:28:43 -0700 Subject: [Keyboard] Fixup Ungodly Launch Pad config (#13992) --- keyboards/ungodly/launch_pad/config.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index b16b0df97a..66d940c1b7 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -49,22 +49,6 @@ #define MIDI_ADVANCED /* RGB Matrix configuration */ -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_PIXEL_FLOW -# define DISABLE_RGB_MATRIX_PIXEL_FRACTAL -# define DISABLE_RGB_MATRIX_PIXEL_RAIN -# define DRIVER_LED_TOTAL 22 -#endif - #define RGB_DI_PIN F7 #ifdef RGB_MATRIX_ENABLE # define RGBLED_NUM 22 @@ -72,7 +56,7 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) @@ -124,5 +108,3 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 - -#define LOCKING_RESYNC_ENABLE -- cgit v1.2.3 From 4b453dca92f87899d98b5340b16677bd78a52beb Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 15 Aug 2021 20:51:13 +0000 Subject: Remove MIDI Configuration boilerplate (#11151) * remove keyboard-level instances of `MIDI_ENABLE = no` Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e '/^[ #]*MIDI_ENABLE[ \t]*=[ \t]*no/d' {} + ``` Co-Authored-By: Nick Brassel * fix case-sensitivity issues on MIDI_ENABLE Change instances of `MIDI_ENABLE = YES` to `MIDI_ENABLE = yes`. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE[ \t]*=[ \t]*[Yy][Ee][Ss];MIDI_ENABLE = yes;g' {} + ``` * replace `# MIDI controls` with `# MIDI support` Replace `# MIDI controls` with `# MIDI support` in keyboard-level `rules.mk` files. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*MIDI[ \t]*\(controls\|support\).*;# MIDI support;g' {} + ``` * align inline comments Aligns the inline comments to the length used by the QMK AVR rules.mk template. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE *= *yes.*;MIDI_ENABLE = yes # MIDI support;g' {} + ``` * remove commented instances of `MIDI_ENABLE` from keyboard `rules.mk` files Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#\([ \t]*MIDI_ENABLE\) = yes; \1 = no ;' {} + find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;^\([ \t]*\)\(MIDI_ENABLE = no\);\2\1;' {} + find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e '/^[ #]\+MIDI_ENABLE *= *no/d' {} + ``` * remove MIDI configuration boilerplate from keyboard config.h files Co-authored-by: Nick Brassel --- keyboards/ungodly/launch_pad/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk index 1b796bbfe1..059401b801 100644 --- a/keyboards/ungodly/launch_pad/rules.mk +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -20,7 +20,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -MIDI_ENABLE = yes +MIDI_ENABLE = yes # MIDI support OLED_DRIVER_ENABLE = yes ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = yes -- cgit v1.2.3 From 4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:28:26 +1000 Subject: [Core] Refactor OLED to allow easy addition of other types (#13454) * add docs * core changes * update keyboards to new OLED * updated users to new OLED * update layouts to new OLED * fixup docs * drashna's suggestion * fix up docs * new keyboards with oled * core split changes * remaining keyboard files * Fix The Helix keyboards oled options * reflect develop Co-authored-by: Drashna Jaelre Co-authored-by: mtei <2170248+mtei@users.noreply.github.com> --- keyboards/ungodly/launch_pad/keymaps/default/keymap.c | 3 ++- keyboards/ungodly/launch_pad/keymaps/via/keymap.c | 2 +- keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c | 2 +- keyboards/ungodly/launch_pad/rules.mk | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'keyboards/ungodly') diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c index a401be7e8b..42b6b397ca 100644 --- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -150,7 +150,8 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE + oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c index a401be7e8b..083bb8b815 100644 --- a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c @@ -150,7 +150,7 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c index 04270bcf3d..4f856b9770 100644 --- a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c @@ -126,7 +126,7 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk index 059401b801..25bc4e7da4 100644 --- a/keyboards/ungodly/launch_pad/rules.mk +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -20,8 +20,9 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -MIDI_ENABLE = yes # MIDI support -OLED_DRIVER_ENABLE = yes +MIDI_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 -- cgit v1.2.3