Fixed issue with draculad color setting

This commit is contained in:
Sadek Baroudi 2021-04-16 17:06:40 -07:00
parent f3e8ae1e06
commit 7c6ca80f82
3 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include "sadekbaroudi.h"
#include QMK_KEYBOARD_H
#include <stdio.h>
#ifndef UNICODE_ENABLE
# define UC(x) KC_NO

View File

@ -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;

View File

@ -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