From 7c6ca80f8239248291a8444f2e8ebdb4096e4dd4 Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Fri, 16 Apr 2021 17:06:40 -0700 Subject: [PATCH] Fixed issue with draculad color setting --- keyboards/draculad/keymaps/sadekbaroudi/keymap.c | 1 + users/sadekbaroudi/process_records.c | 5 ++++- users/sadekbaroudi/rules.mk | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/keyboards/draculad/keymaps/sadekbaroudi/keymap.c b/keyboards/draculad/keymaps/sadekbaroudi/keymap.c index adb99e05d2..b01c7a8764 100644 --- a/keyboards/draculad/keymaps/sadekbaroudi/keymap.c +++ b/keyboards/draculad/keymaps/sadekbaroudi/keymap.c @@ -1,6 +1,7 @@ #include "sadekbaroudi.h" #include QMK_KEYBOARD_H +#include #ifndef UNICODE_ENABLE # define UC(x) KC_NO diff --git a/users/sadekbaroudi/process_records.c b/users/sadekbaroudi/process_records.c index d983f9d8e6..253856c518 100755 --- a/users/sadekbaroudi/process_records.c +++ b/users/sadekbaroudi/process_records.c @@ -139,10 +139,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { + xprintf("RGB: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); bool is_eeprom_updated = false; if (userspace_config.rgb_layer_change) { # if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) + // For some reason, this breaks setting base layer colors on the draculad, need to comment this line out rgblight_set_hsv_and_mode(userspace_config.hue, userspace_config.sat, userspace_config.val, userspace_config.mode); # endif } @@ -165,7 +167,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { userspace_config.sat = rgblight_get_sat(); userspace_config.val = rgblight_get_val(); userspace_config.speed = rgblight_get_speed(); - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user(userspace_config.raw); + xprintf("RGB: mode: %u, hue: %u, sat: %u, val: %u, speed: %u\n", userspace_config.mode, userspace_config.hue, userspace_config.sat, userspace_config.val, userspace_config.speed); # endif } break; diff --git a/users/sadekbaroudi/rules.mk b/users/sadekbaroudi/rules.mk index 845e368cf2..992d18f267 100755 --- a/users/sadekbaroudi/rules.mk +++ b/users/sadekbaroudi/rules.mk @@ -3,9 +3,12 @@ SRC += sadekbaroudi.c \ BOOTLOADER = atmel-dfu COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = no +NKRO_ENABLE = no SPACE_CADET_ENABLE = no GRAVE_ESC_ENABLE = no