diff --git a/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md b/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md
index 18c556b2f7..b0336a6770 100644
--- a/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md
+++ b/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md
@@ -15,6 +15,7 @@ That said, if you are looking to leverage the features, you may be able to follo
Note that below is an example. You should check for the latest version of this code block as found in `keyboards/fingerpunch/ffkb_byomcu/rules.mk`
```make
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/README.md b/keyboards/fingerpunch/README.md
index 488d8e57a9..56470c21fa 100644
--- a/keyboards/fingerpunch/README.md
+++ b/keyboards/fingerpunch/README.md
@@ -1,10 +1,9 @@
# fingerpunch keyboards
-
## Operating system
-| Setting | Description | Default |
-| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
-| `FP_MAC_PREFERRED` | (Optional) If you are primarily using a Mac, enable to use Mac specific keycode logic for fingerpunch features | `undefined` |
+| Setting | Description | Default |
+| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
+| `FP_MAC_PREFERRED` | (Optional) If you are primarily using a Mac, enable to use Mac specific logic for fingerpunch features (mostly for keycodes) | `undefined` |
## Keycodes and settings
@@ -46,6 +45,7 @@ Note: if you are using a userspace, and you have custom keycodes, you will need
|| defined(KEYBOARD_fingerpunch_pinkiesout) \
|| defined(KEYBOARD_fingerpunch_rockon_v1) \
|| defined(KEYBOARD_fingerpunch_rockon_v2) \
+ || defined(KEYBOARD_fingerpunch_rockon_v3) \
|| defined(KEYBOARD_fingerpunch_rockon_bp) \
|| defined(KEYBOARD_fingerpunch_sweeeeep) \
|| defined(KEYBOARD_fingerpunch_ximi)
@@ -115,7 +115,9 @@ void pointing_device_init_user(void) {
## RGB Lighting
-Note that unless otherwise specified, features for rgb are supported on both rgblight ( https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md ) and rgb matrix ( https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgb_matrix.md ).
+Notes:
+* unless otherwise specified, features for rgb are supported on both rgblight ( https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md ) and rgb matrix ( https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgb_matrix.md ).
+* the base layer is still configurable using the QMK rgb keycodes ( https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md#keycodes ), but you will need to enable the `FP_LAYER_LIGHTING_DYNAMIC_BASE_LAYER`
Some config parameters will depend on which you're using, like `FP_LAYER_LIGHTING_MODE`.
@@ -123,31 +125,33 @@ Some config parameters will depend on which you're using, like `FP_LAYER_LIGHTIN
If using this feature (`FP_LAYER_LIGHTING_ENABLE`), please note that the `FP_LAYER_LIGHTING_AUTO_MOUSE_ENABLE` will be automatically disabled. Given that this feature will handle the auto mouse layer as well, you don't need to activate the layer lighting twice. Just set the mouse layer lighting to the color you prefer using the `FP_LAYER_LIGHTING_HUE_X` below.
-| Setting | Description | Default |
-| --------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `FP_LAYER_LIGHTING_ENABLE` | (Optional) Define this to enable layer lighting | `undefined` |
-| `FP_LAYER_LIGHTING_MODE` | (Required) Set the layer lighting default mode | `RGBLIGHT_MODE_STATIC_LIGHT` or `RGB_MATRIX_SOLID_COLOR` |
-| `FP_LAYER_LIGHTING_HUE_0` | (Required) Set the layer lighting hue for layer 0 | `HSV_BLUE` |
-| `FP_LAYER_LIGHTING_HUE_1` | (Required) Set the layer lighting hue for layer 1 | `HSV_WHITE` |
-| `FP_LAYER_LIGHTING_HUE_2` | (Required) Set the layer lighting hue for layer 2 | `HSV_GREEN` |
-| `FP_LAYER_LIGHTING_HUE_3` | (Required) Set the layer lighting hue for layer 3 | `HSV_PURPLE` |
-| `FP_LAYER_LIGHTING_HUE_4` | (Required) Set the layer lighting hue for layer 4 | `HSV_YELLOW` |
-| `FP_LAYER_LIGHTING_HUE_5` | (Required) Set the layer lighting hue for layer 5 | `HSV_MAGENTA` |
-| `FP_LAYER_LIGHTING_HUE_6` | (Required) Set the layer lighting hue for layer 6 | `HSV_CYAN` |
-| `FP_LAYER_LIGHTING_HUE_7` | (Required) Set the layer lighting hue for layer 7 | `HSV_SPRINGGREEN` |
-| `FP_LAYER_LIGHTING_MODE_0` | (Required) Set the layer lighting mode for layer 0 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_1` | (Required) Set the layer lighting mode for layer 1 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_2` | (Required) Set the layer lighting mode for layer 2 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_3` | (Required) Set the layer lighting mode for layer 3 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_4` | (Required) Set the layer lighting mode for layer 4 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_5` | (Required) Set the layer lighting mode for layer 5 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_6` | (Required) Set the layer lighting mode for layer 6 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_MODE_7` | (Required) Set the layer lighting mode for layer 7 | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_CAPS_LOCK_HUE` | (Required) Set the layer lighting hue when caps lock is enabled | `HSV_RED` |
-| `FP_LAYER_LIGHTING_CAPS_LOCK_MODE` | (Required) Set the layer lighting mode when caps lock is enabled | `FP_LAYER_LIGHTING_MODE` |
-| `FP_LAYER_LIGHTING_AUTO_MOUSE_ENABLE` | (Optional) If using RGB, set the layer lighting when auto mouse is triggered | `undefined` |
-| `FP_LAYER_LIGHTING_AUTO_MOUSE_HUE` | (Required) This is the hue that is used for the auto mouse layer lighting | `HSV_ORANGE` |
-| `FP_LAYER_LIGHTING_AUTO_MOUSE_MODE` | (Required) This is the mode that is used for the auto mouse layer lighting | `FP_LAYER_LIGHTING_MODE` |
+| Setting | Description | Default |
+| --------------------------------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| `FP_STARTUP_ANIMATION_DISABLE` | (Optional) Define this to disable startup animation | `undefined` |
+| `FP_LAYER_LIGHTING_ENABLE` | (Optional) Define this to enable layer lighting | `undefined` |
+| `FP_LAYER_LIGHTING_DYNAMIC_BASE_LAYER` | (Optional) While using layer lighting, enable dynamically changing the base layer | `undefined` |
+| `FP_LAYER_LIGHTING_MODE` | (Required) Set the layer lighting default mode | `RGBLIGHT_MODE_STATIC_LIGHT` or `RGB_MATRIX_SOLID_COLOR` |
+| `FP_LAYER_LIGHTING_HUE_0` | (Required) Set the layer lighting hue for layer 0 | `HSV_BLUE` |
+| `FP_LAYER_LIGHTING_HUE_1` | (Required) Set the layer lighting hue for layer 1 | `HSV_WHITE` |
+| `FP_LAYER_LIGHTING_HUE_2` | (Required) Set the layer lighting hue for layer 2 | `HSV_GREEN` |
+| `FP_LAYER_LIGHTING_HUE_3` | (Required) Set the layer lighting hue for layer 3 | `HSV_PURPLE` |
+| `FP_LAYER_LIGHTING_HUE_4` | (Required) Set the layer lighting hue for layer 4 | `HSV_YELLOW` |
+| `FP_LAYER_LIGHTING_HUE_5` | (Required) Set the layer lighting hue for layer 5 | `HSV_MAGENTA` |
+| `FP_LAYER_LIGHTING_HUE_6` | (Required) Set the layer lighting hue for layer 6 | `HSV_CYAN` |
+| `FP_LAYER_LIGHTING_HUE_7` | (Required) Set the layer lighting hue for layer 7 | `HSV_SPRINGGREEN` |
+| `FP_LAYER_LIGHTING_MODE_0` | (Required) Set the layer lighting mode for layer 0 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_1` | (Required) Set the layer lighting mode for layer 1 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_2` | (Required) Set the layer lighting mode for layer 2 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_3` | (Required) Set the layer lighting mode for layer 3 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_4` | (Required) Set the layer lighting mode for layer 4 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_5` | (Required) Set the layer lighting mode for layer 5 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_6` | (Required) Set the layer lighting mode for layer 6 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_MODE_7` | (Required) Set the layer lighting mode for layer 7 | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_CAPS_LOCK_HUE` | (Required) Set the layer lighting hue when caps lock is enabled | `HSV_RED` |
+| `FP_LAYER_LIGHTING_CAPS_LOCK_MODE` | (Required) Set the layer lighting mode when caps lock is enabled | `FP_LAYER_LIGHTING_MODE` |
+| `FP_LAYER_LIGHTING_AUTO_MOUSE_ENABLE` | (Optional) If using RGB, set the layer lighting when auto mouse is triggered | `undefined` |
+| `FP_LAYER_LIGHTING_AUTO_MOUSE_HUE` | (Required) This is the hue that is used for the auto mouse layer lighting | `HSV_ORANGE` |
+| `FP_LAYER_LIGHTING_AUTO_MOUSE_MODE` | (Required) This is the mode that is used for the auto mouse layer lighting | `FP_LAYER_LIGHTING_MODE` |
## Haptic Feedback
@@ -165,3 +169,10 @@ Note that the ctrl-X haptic feedback responses will use control as the modifier,
## Keymap
If you are looking to use process_record_kb() or process_record
+
+
+## Appreciation
+
+Thank you:
+* Drashna - for the great examples in their userspace implementation.
+* Wilbatech - for the example of keyboard agnostic code in QMK.
diff --git a/keyboards/fingerpunch/arachnophobe/rules.mk b/keyboards/fingerpunch/arachnophobe/rules.mk
index aefd3a70d0..bc80a08712 100644
--- a/keyboards/fingerpunch/arachnophobe/rules.mk
+++ b/keyboards/fingerpunch/arachnophobe/rules.mk
@@ -30,6 +30,7 @@ OLED_ENABLE = no # this can be yes or no depending on if you have an
EXTRAFLAGS += -flto # macros enable or disable
MOUSEKEY_ENABLE = yes
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/barobord/config.h b/keyboards/fingerpunch/barobord/config.h
index e8e04c033c..4d0e09508b 100644
--- a/keyboards/fingerpunch/barobord/config.h
+++ b/keyboards/fingerpunch/barobord/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 60 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -66,7 +66,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 40
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 60 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/barobord/rules.mk b/keyboards/fingerpunch/barobord/rules.mk
index 29a90d5dfa..e349f59501 100644
--- a/keyboards/fingerpunch/barobord/rules.mk
+++ b/keyboards/fingerpunch/barobord/rules.mk
@@ -48,6 +48,7 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/barobord_byomcu/config.h b/keyboards/fingerpunch/barobord_byomcu/config.h
index c8b72194be..e73dde16f9 100644
--- a/keyboards/fingerpunch/barobord_byomcu/config.h
+++ b/keyboards/fingerpunch/barobord_byomcu/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 60 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -66,7 +66,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 40
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 60 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/barobord_byomcu/rules.mk b/keyboards/fingerpunch/barobord_byomcu/rules.mk
index eaccd4576a..78dab5289a 100644
--- a/keyboards/fingerpunch/barobord_byomcu/rules.mk
+++ b/keyboards/fingerpunch/barobord_byomcu/rules.mk
@@ -55,6 +55,7 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/bgkeeb/config.h b/keyboards/fingerpunch/bgkeeb/config.h
index 975bb153bb..4284e851f4 100644
--- a/keyboards/fingerpunch/bgkeeb/config.h
+++ b/keyboards/fingerpunch/bgkeeb/config.h
@@ -54,26 +54,17 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 60 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
-// /*== all animations enable ==*/
-// #define RGBLIGHT_ANIMATIONS
-// /*== or choose animations ==*/
-// #define RGBLIGHT_EFFECT_BREATHING
-// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
- #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
-// #define RGBLIGHT_EFFECT_SNAKE
-// #define RGBLIGHT_EFFECT_KNIGHT
-// #define RGBLIGHT_EFFECT_CHRISTMAS
-// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
-// #define RGBLIGHT_EFFECT_RGB_TEST
-// #define RGBLIGHT_EFFECT_ALTERNATING
-// /*== customize breathing effect ==*/
-// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
-// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
-// /*==== use exp() and sin() ====*/
-// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
-// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+ #define RGBLIGHT_EFFECT_ALTERNATING
+ #define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_KNIGHT
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ #define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ #define RGBLIGHT_EFFECT_TWINKLE
#endif
#define ENCODERS_PAD_A {B5}
diff --git a/keyboards/fingerpunch/bgkeeb/rules.mk b/keyboards/fingerpunch/bgkeeb/rules.mk
index 5cae157773..a87b3c91c5 100644
--- a/keyboards/fingerpunch/bgkeeb/rules.mk
+++ b/keyboards/fingerpunch/bgkeeb/rules.mk
@@ -25,6 +25,7 @@ SPLIT_KEYBOARD = yes
LAYOUTS = split_3x5_3
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/bigbarobord/config.h b/keyboards/fingerpunch/bigbarobord/config.h
index 72a176aaaa..5b88e4b438 100644
--- a/keyboards/fingerpunch/bigbarobord/config.h
+++ b/keyboards/fingerpunch/bigbarobord/config.h
@@ -51,7 +51,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 112 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -67,7 +67,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 52
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 112 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/bigbarobord/rules.mk b/keyboards/fingerpunch/bigbarobord/rules.mk
index ca0749ef39..e7905d1212 100644
--- a/keyboards/fingerpunch/bigbarobord/rules.mk
+++ b/keyboards/fingerpunch/bigbarobord/rules.mk
@@ -48,6 +48,7 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/ffkb/rules.mk b/keyboards/fingerpunch/ffkb/rules.mk
index 7edc4d9beb..0afc7c11bb 100644
--- a/keyboards/fingerpunch/ffkb/rules.mk
+++ b/keyboards/fingerpunch/ffkb/rules.mk
@@ -63,6 +63,7 @@ ifeq ($(strip $(FP_EVQ_UNDER_PALMS)), yes)
OPT_DEFS += -DFP_EVQ_UNDER_PALMS
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/ffkb_byomcu/config.h b/keyboards/fingerpunch/ffkb_byomcu/config.h
index 390573943e..fd4f6fc314 100644
--- a/keyboards/fingerpunch/ffkb_byomcu/config.h
+++ b/keyboards/fingerpunch/ffkb_byomcu/config.h
@@ -40,7 +40,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 112 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -56,7 +56,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 42
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 112 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/ffkb_byomcu/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/rules.mk
index 253c2a80ba..a55d4b419b 100644
--- a/keyboards/fingerpunch/ffkb_byomcu/rules.mk
+++ b/keyboards/fingerpunch/ffkb_byomcu/rules.mk
@@ -1,3 +1,4 @@
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/fp.c b/keyboards/fingerpunch/fp.c
index bddad4f719..312f09aa39 100644
--- a/keyboards/fingerpunch/fp.c
+++ b/keyboards/fingerpunch/fp.c
@@ -16,6 +16,12 @@
#include "keyboards/fingerpunch/fp.h"
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+#include "keyboards/fingerpunch/fp_rgb_common.h"
+#endif
+
+fp_config_t fp_config;
+
#ifndef FP_SUPER_TAB_TIMEOUT
# define FP_SUPER_TAB_TIMEOUT 500
#endif
@@ -87,6 +93,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
+void keyboard_pre_init_kb(void) {
+ fp_config.raw = eeconfig_read_user();
+ keyboard_pre_init_user();
+}
+
void keyboard_post_init_kb(void) {
#if defined(PIMORONI_TRACKBALL_ENABLE) && !defined(RGBLIGHT_ENABLE)
pimoroni_trackball_set_rgbw(RGB_BLUE, 0x00);
@@ -96,6 +107,18 @@ void keyboard_post_init_kb(void) {
fp_pointing_device_set_cpi_combined_defaults();
#endif
+ #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ fp_post_init_rgb_common();
+ #endif
+
+ #if defined(RGBLIGHT_ENABLE)
+ fp_post_init_rgblight();
+ #endif
+
+ #if defined(RGB_MATRIX_ENABLE)
+ fp_post_init_rgb_matrix();
+ #endif
+
keyboard_post_init_user();
}
@@ -118,3 +141,16 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
return layer_state_set_user(state);
}
+
+void eeconfig_init_kb(void) {
+ fp_config.raw = 0;
+ #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ fp_config.rgb_mode = FP_LAYER_LIGHTING_MODE_0;
+ fp_config.rgb_hue = fp_rgb_get_element_from_hsv(FP_LAYER_LIGHTING_HUE_0, 0);
+ #endif
+ fp_config.rgb_sat = 255;
+ fp_config.rgb_val = 255;
+ fp_config.rgb_speed = 1;
+ eeconfig_update_kb(fp_config.raw);
+ eeconfig_init_user();
+}
diff --git a/keyboards/fingerpunch/fp.h b/keyboards/fingerpunch/fp.h
index 4f41e104c0..48660aa2fd 100644
--- a/keyboards/fingerpunch/fp.h
+++ b/keyboards/fingerpunch/fp.h
@@ -15,6 +15,7 @@
*/
#pragma once
+
#include QMK_KEYBOARD_H
#include "eeprom.h"
@@ -48,7 +49,11 @@ void press_super_tab(bool shift);
typedef union {
uint32_t raw;
struct {
- bool rgb_layer_change :1;
+ uint8_t rgb_mode;
+ uint8_t rgb_hue;
+ uint8_t rgb_sat;
+ uint8_t rgb_val;
+ uint8_t rgb_speed;
};
} fp_config_t;
// clang-format on
diff --git a/keyboards/fingerpunch/fp_keyhandler.c b/keyboards/fingerpunch/fp_keyhandler.c
index 8764fb8356..a8be24c95a 100644
--- a/keyboards/fingerpunch/fp_keyhandler.c
+++ b/keyboards/fingerpunch/fp_keyhandler.c
@@ -23,12 +23,15 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
#endif // KEYLOGGER_ENABLE
if (!(process_record_user(keycode, record)
-#ifdef RGB_MATRIX_ENABLE
- && fp_process_record_rgb_matrix(keycode, record)
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ && fp_process_record_rgb_common(keycode, record)
#endif
#ifdef RGBLIGHT_ENABLE
&& fp_process_record_rgblight(keycode, record)
#endif
+#ifdef RGB_MATRIX_ENABLE
+ && fp_process_record_rgb_matrix(keycode, record)
+#endif
#ifdef FP_UNICODE_ENABLE
&& fp_process_record_unicode(keycode, record)
#endif
diff --git a/keyboards/fingerpunch/fp_pointing.h b/keyboards/fingerpunch/fp_pointing.h
index 4817eecc09..98ca6ba0ad 100644
--- a/keyboards/fingerpunch/fp_pointing.h
+++ b/keyboards/fingerpunch/fp_pointing.h
@@ -29,3 +29,37 @@ void fp_snipe_set(bool snipe_value);
bool fp_snipe_get(void);
void fp_snipe_toggle(void);
void fp_snipe_apply_dpi(void);
+
+#ifdef POINTING_DEVICE_ENABLE
+# ifndef FP_POINTING_DEFAULT_DPI
+# define FP_POINTING_DEFAULT_DPI 1000
+# endif
+
+# ifndef FP_POINTING_SNIPING_DPI
+# define FP_POINTING_SNIPING_DPI 50
+# endif
+
+# ifndef FP_POINTING_SNIPING_LAYER
+# define FP_POINTING_SNIPING_LAYER 2
+# endif
+
+# ifndef FP_POINTING_SCROLLING_DPI
+# define FP_POINTING_SCROLLING_DPI 50
+# endif
+
+# ifndef FP_POINTING_SCROLLING_LAYER
+# define FP_POINTING_SCROLLING_LAYER 3
+# endif
+
+# ifndef FP_POINTING_COMBINED_SCROLLING_LEFT
+# define FP_POINTING_COMBINED_SCROLLING_LEFT true
+# endif
+
+# ifndef FP_POINTING_COMBINED_SCROLLING_RIGHT
+# define FP_POINTING_COMBINED_SCROLLING_RIGHT false
+# endif
+
+# ifndef FP_AUTO_MOUSE_TRACKBALL_SENSITIVITY
+# define FP_AUTO_MOUSE_TRACKBALL_SENSITIVITY 3
+# endif
+#endif
diff --git a/keyboards/fingerpunch/fp_rgb_common.c b/keyboards/fingerpunch/fp_rgb_common.c
index 7320102359..37c52fa7c3 100644
--- a/keyboards/fingerpunch/fp_rgb_common.c
+++ b/keyboards/fingerpunch/fp_rgb_common.c
@@ -14,7 +14,6 @@
* along with this program. If not, see .
*/
-
#include "keyboards/fingerpunch/fp_rgb_common.h"
// We must make sure that fp_rgb_matrix.h or fp_rgblight.h are included before this, since it depends on FP_LAYER_LIGHTING_MODE
@@ -27,90 +26,50 @@
#endif
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
-# ifndef FP_LAYER_LIGHTING_HUE_0
-# define FP_LAYER_LIGHTING_HUE_0 HSV_BLUE
-# endif // FP_LAYER_LIGHTING_HUE_0
-# ifndef FP_LAYER_LIGHTING_HUE_1
-# define FP_LAYER_LIGHTING_HUE_1 HSV_WHITE
-# endif // FP_LAYER_LIGHTING_HUE_1
+#if !defined(FP_STARTUP_ANIMATION_DISABLE)
+static bool is_enabled;
+static bool is_rgb_startup;
+static HSV old_hsv;
+static uint8_t old_mode;
+deferred_token rgb_startup_token;
-# ifndef FP_LAYER_LIGHTING_HUE_2
-# define FP_LAYER_LIGHTING_HUE_2 HSV_GREEN
-# endif // FP_LAYER_LIGHTING_HUE_2
+uint32_t fp_rgb_startup_animation(uint32_t triger_time, void *cb_arg) {
+ if (is_rgb_startup && is_keyboard_master()) {
+ static uint8_t counter = 0;
+ counter++;
+ rgblight_sethsv_noeeprom((counter + old_hsv.h) % 255, 255, 255);
+ if (counter >= 255) {
+ is_rgb_startup = false;
+ fp_rgb_set_hsv_and_mode(old_hsv.h, old_hsv.s, old_hsv.v, old_mode);
+ if (!is_enabled) {
+ rgblight_disable_noeeprom();
+ }
+ }
+ }
+ return is_rgb_startup ? 10 : 0;
+}
+#endif
-# ifndef FP_LAYER_LIGHTING_HUE_3
-# define FP_LAYER_LIGHTING_HUE_3 HSV_PURPLE
-# endif // FP_LAYER_LIGHTING_HUE_3
-
-# ifndef FP_LAYER_LIGHTING_HUE_4
-# define FP_LAYER_LIGHTING_HUE_4 HSV_YELLOW
-# endif // FP_LAYER_LIGHTING_HUE_4
-
-# ifndef FP_LAYER_LIGHTING_HUE_5
-# define FP_LAYER_LIGHTING_HUE_5 HSV_MAGENTA
-# endif // FP_LAYER_LIGHTING_HUE_5
-
-# ifndef FP_LAYER_LIGHTING_HUE_6
-# define FP_LAYER_LIGHTING_HUE_6 HSV_CYAN
-# endif // FP_LAYER_LIGHTING_HUE_6
-
-# ifndef FP_LAYER_LIGHTING_HUE_7
-# define FP_LAYER_LIGHTING_HUE_7 HSV_SPRINGGREEN
-# endif // FP_LAYER_LIGHTING_HUE_7
-
-# ifndef FP_LAYER_LIGHTING_MODE_0
-# define FP_LAYER_LIGHTING_MODE_0 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_0
-
-# ifndef FP_LAYER_LIGHTING_MODE_1
-# define FP_LAYER_LIGHTING_MODE_1 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_1
-
-# ifndef FP_LAYER_LIGHTING_MODE_2
-# define FP_LAYER_LIGHTING_MODE_2 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_2
-
-# ifndef FP_LAYER_LIGHTING_MODE_3
-# define FP_LAYER_LIGHTING_MODE_3 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_3
-
-# ifndef FP_LAYER_LIGHTING_MODE_4
-# define FP_LAYER_LIGHTING_MODE_4 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_4
-
-# ifndef FP_LAYER_LIGHTING_MODE_5
-# define FP_LAYER_LIGHTING_MODE_5 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_5
-
-# ifndef FP_LAYER_LIGHTING_MODE_6
-# define FP_LAYER_LIGHTING_MODE_6 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_6
-
-# ifndef FP_LAYER_LIGHTING_MODE_7
-# define FP_LAYER_LIGHTING_MODE_7 FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_MODE_7
-
-# ifndef FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
-# define FP_LAYER_LIGHTING_AUTO_MOUSE_HUE HSV_ORANGE
-# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
-
-# ifndef FP_LAYER_LIGHTING_AUTO_MOUSE_MODE
-# define FP_LAYER_LIGHTING_AUTO_MOUSE_MODE FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
-
-# ifndef FP_LAYER_LIGHTING_CAPS_LOCK_HUE
-# define FP_LAYER_LIGHTING_CAPS_LOCK_HUE HSV_RED
-# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
-
-# ifndef FP_LAYER_LIGHTING_CAPS_LOCK_MODE
-# define FP_LAYER_LIGHTING_CAPS_LOCK_MODE FP_LAYER_LIGHTING_MODE
-# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+void fp_post_init_rgb_common(void) {
+#if !defined(FP_STARTUP_ANIMATION_DISABLE)
+ is_enabled = rgblight_is_enabled();
+ old_hsv = rgblight_get_hsv();
+ old_mode = rgblight_get_mode();
+#if defined(RGBLIGHT_ENABLE)
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+#endif
+#if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+#endif
+ is_rgb_startup = true;
+ rgb_startup_token = defer_exec(300, fp_rgb_startup_animation, NULL);
+#endif
+}
layer_state_t fp_layer_state_set_rgb(layer_state_t state) {
switch (get_highest_layer(state)) {
- // TODO: This logic is clearly flawed, decide what to do with this
-# if defined(FP_LAYER_LIGHTING_ENABLE) && defined(AUTO_MOUSE_DEFAULT_LAYER) && !defined(FP_LAYER_LIGHTING_ENABLE)
+# if defined(FP_LAYER_LIGHTING_AUTO_MOUSE_ENABLE) && defined(AUTO_MOUSE_DEFAULT_LAYER) && !defined(FP_LAYER_LIGHTING_ENABLE)
case AUTO_MOUSE_DEFAULT_LAYER:
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_AUTO_MOUSE_HUE, FP_LAYER_LIGHTING_AUTO_MOUSE_MODE);
break;
@@ -119,8 +78,14 @@ layer_state_t fp_layer_state_set_rgb(layer_state_t state) {
# ifdef FP_LAYER_LIGHTING_ENABLE
if (fp_caps_lock_get()) {
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_CAPS_LOCK_HUE, FP_LAYER_LIGHTING_CAPS_LOCK_MODE);
+ xprintf("caps lock /n");
} else {
+# ifdef FP_LAYER_LIGHTING_DYNAMIC_BASE_LAYER
+ fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
+# else
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_0, FP_LAYER_LIGHTING_MODE_0);
+# endif
+ xprintf("base layer /n");
}
# endif
break;
@@ -128,44 +93,108 @@ layer_state_t fp_layer_state_set_rgb(layer_state_t state) {
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_1, FP_LAYER_LIGHTING_MODE_1);
# endif
+ xprintf("layer 1: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_1, FP_LAYER_LIGHTING_MODE_1);
break;
case 2:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_2, FP_LAYER_LIGHTING_MODE_2);
# endif
+ xprintf("layer 2: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_2, FP_LAYER_LIGHTING_MODE_2);
break;
case 3:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_3, FP_LAYER_LIGHTING_MODE_3);
# endif
+ xprintf("layer 3: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_3, FP_LAYER_LIGHTING_MODE_3);
break;
case 4:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_4, FP_LAYER_LIGHTING_MODE_4);
# endif
+ xprintf("layer 4: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_4, FP_LAYER_LIGHTING_MODE_4);
break;
case 5:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_5, FP_LAYER_LIGHTING_MODE_5);
# endif
+ xprintf("layer 5: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_5, FP_LAYER_LIGHTING_MODE_5);
break;
case 6:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_6, FP_LAYER_LIGHTING_MODE_6);
# endif
+ xprintf("layer 6: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_6, FP_LAYER_LIGHTING_MODE_6);
break;
case 7:
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_7, FP_LAYER_LIGHTING_MODE_7);
# endif
+ xprintf("layer 7: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_7, FP_LAYER_LIGHTING_MODE_7);
break;
default:
// default to layer 0 behavior
# ifdef FP_LAYER_LIGHTING_ENABLE
fp_rgb_set_hsv_and_mode(FP_LAYER_LIGHTING_HUE_0, FP_LAYER_LIGHTING_MODE_0);
# endif
+ xprintf("layer default: hue: {%d, %d, %d}, mode: %d\n", FP_LAYER_LIGHTING_HUE_0, FP_LAYER_LIGHTING_MODE_0);
break;
}
return state;
}
+
+// Deferred exec function
+uint32_t fp_rgb_set_config_from_current_values(uint32_t triger_time, void *cb_arg) {
+ fp_config.rgb_mode = rgblight_get_mode();
+ fp_config.rgb_hue = rgblight_get_hue();
+ fp_config.rgb_sat = rgblight_get_sat();
+ fp_config.rgb_val = rgblight_get_val();
+ fp_config.rgb_speed = rgblight_get_speed();
+ eeconfig_update_user(fp_config.raw);
+ xprintf("RGB: mode: %u, hue: %u, sat: %u, val: %u, speed: %u\n", fp_config.rgb_mode, fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_speed);
+
+ return 0;
+}
+
+bool fp_process_record_rgb_common(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
+ if (record->event.pressed) {
+ fp_rgb_set_hsv_and_mode(fp_config.rgb_hue, fp_config.rgb_sat, fp_config.rgb_val, fp_config.rgb_mode);
+ }
+ if (!record->event.pressed) {
+ // in fp_keyhandler.c, because process_record() gets called before fp_process_record_rgb_common, and because
+ // the rgb light change happens on the key release (!record->event.pressed), that means that this code gets called
+ // before the process_record key release
+ // Sooooo, need a defered exec event to handle this
+ defer_exec(20, fp_rgb_set_config_from_current_values, NULL);
+ }
+ break;
+# ifndef FP_DISABLE_CUSTOM_KEYCODES
+# endif // FP_DISABLE_CUSTOM_KEYCODES
+ default:
+ break;
+ }
+
+ return true;
+}
+
+// Returns hue, sat, or val, depending on the value of whichOne (0 for hue, 1 for sat, 2 for val)
+uint8_t fp_rgb_get_element_from_hsv(uint8_t hue, uint8_t sat, uint8_t val, uint8_t whichOne) {
+ switch (whichOne) {
+ case 0:
+ return hue;
+ xprintf("fp_rgb_get_element_from_hsv: returning hue value: %d", hue);
+ break;
+ case 1:
+ return sat;
+ break;
+ case 2:
+ return val;
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
#endif
diff --git a/keyboards/fingerpunch/fp_rgb_common.h b/keyboards/fingerpunch/fp_rgb_common.h
index d855dd8598..7dd40c9226 100644
--- a/keyboards/fingerpunch/fp_rgb_common.h
+++ b/keyboards/fingerpunch/fp_rgb_common.h
@@ -20,3 +20,89 @@
layer_state_t fp_layer_state_set_rgb(layer_state_t state);
void fp_rgb_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode);
+void fp_post_init_rgb_common(void);
+bool fp_process_record_rgb_common(uint16_t keycode, keyrecord_t *record);
+uint32_t fp_rgb_set_config_from_current_values(uint32_t triger_time, void *cb_arg);
+uint8_t fp_rgb_get_element_from_hsv(uint8_t hue, uint8_t sat, uint8_t val, uint8_t whichOne);
+
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+# ifndef FP_LAYER_LIGHTING_HUE_0
+# define FP_LAYER_LIGHTING_HUE_0 HSV_BLUE
+# endif // FP_LAYER_LIGHTING_HUE_0
+
+# ifndef FP_LAYER_LIGHTING_HUE_1
+# define FP_LAYER_LIGHTING_HUE_1 HSV_WHITE
+# endif // FP_LAYER_LIGHTING_HUE_1
+
+# ifndef FP_LAYER_LIGHTING_HUE_2
+# define FP_LAYER_LIGHTING_HUE_2 HSV_GREEN
+# endif // FP_LAYER_LIGHTING_HUE_2
+
+# ifndef FP_LAYER_LIGHTING_HUE_3
+# define FP_LAYER_LIGHTING_HUE_3 HSV_PURPLE
+# endif // FP_LAYER_LIGHTING_HUE_3
+
+# ifndef FP_LAYER_LIGHTING_HUE_4
+# define FP_LAYER_LIGHTING_HUE_4 HSV_YELLOW
+# endif // FP_LAYER_LIGHTING_HUE_4
+
+# ifndef FP_LAYER_LIGHTING_HUE_5
+# define FP_LAYER_LIGHTING_HUE_5 HSV_MAGENTA
+# endif // FP_LAYER_LIGHTING_HUE_5
+
+# ifndef FP_LAYER_LIGHTING_HUE_6
+# define FP_LAYER_LIGHTING_HUE_6 HSV_CYAN
+# endif // FP_LAYER_LIGHTING_HUE_6
+
+# ifndef FP_LAYER_LIGHTING_HUE_7
+# define FP_LAYER_LIGHTING_HUE_7 HSV_SPRINGGREEN
+# endif // FP_LAYER_LIGHTING_HUE_7
+
+# ifndef FP_LAYER_LIGHTING_MODE_0
+# define FP_LAYER_LIGHTING_MODE_0 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_0
+
+# ifndef FP_LAYER_LIGHTING_MODE_1
+# define FP_LAYER_LIGHTING_MODE_1 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_1
+
+# ifndef FP_LAYER_LIGHTING_MODE_2
+# define FP_LAYER_LIGHTING_MODE_2 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_2
+
+# ifndef FP_LAYER_LIGHTING_MODE_3
+# define FP_LAYER_LIGHTING_MODE_3 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_3
+
+# ifndef FP_LAYER_LIGHTING_MODE_4
+# define FP_LAYER_LIGHTING_MODE_4 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_4
+
+# ifndef FP_LAYER_LIGHTING_MODE_5
+# define FP_LAYER_LIGHTING_MODE_5 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_5
+
+# ifndef FP_LAYER_LIGHTING_MODE_6
+# define FP_LAYER_LIGHTING_MODE_6 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_6
+
+# ifndef FP_LAYER_LIGHTING_MODE_7
+# define FP_LAYER_LIGHTING_MODE_7 FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_MODE_7
+
+# ifndef FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+# define FP_LAYER_LIGHTING_AUTO_MOUSE_HUE HSV_ORANGE
+# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+
+# ifndef FP_LAYER_LIGHTING_AUTO_MOUSE_MODE
+# define FP_LAYER_LIGHTING_AUTO_MOUSE_MODE FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+
+# ifndef FP_LAYER_LIGHTING_CAPS_LOCK_HUE
+# define FP_LAYER_LIGHTING_CAPS_LOCK_HUE HSV_RED
+# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+
+# ifndef FP_LAYER_LIGHTING_CAPS_LOCK_MODE
+# define FP_LAYER_LIGHTING_CAPS_LOCK_MODE FP_LAYER_LIGHTING_MODE
+# endif // FP_LAYER_LIGHTING_AUTO_MOUSE_HUE
+#endif
diff --git a/keyboards/fingerpunch/fp_rgb_matrix.c b/keyboards/fingerpunch/fp_rgb_matrix.c
index a5f0d08dfe..5090965321 100644
--- a/keyboards/fingerpunch/fp_rgb_matrix.c
+++ b/keyboards/fingerpunch/fp_rgb_matrix.c
@@ -23,6 +23,10 @@ void fp_rgb_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
rgb_matrix_mode_noeeprom(mode);
}
+void fp_post_init_rgb_matrix(void) {
+
+}
+
layer_state_t fp_layer_state_set_rgb_matrix(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
diff --git a/keyboards/fingerpunch/fp_rgb_matrix.h b/keyboards/fingerpunch/fp_rgb_matrix.h
index e1d289a1cc..8ddb41bcdf 100644
--- a/keyboards/fingerpunch/fp_rgb_matrix.h
+++ b/keyboards/fingerpunch/fp_rgb_matrix.h
@@ -26,3 +26,4 @@
layer_state_t fp_layer_state_set_rgb_matrix(layer_state_t state);
bool fp_process_record_rgb_matrix(uint16_t keycode, keyrecord_t *record);
+void fp_post_init_rgb_matrix(void);
diff --git a/keyboards/fingerpunch/fp_rgblight.c b/keyboards/fingerpunch/fp_rgblight.c
index f711ad8a06..3034dcf2d7 100644
--- a/keyboards/fingerpunch/fp_rgblight.c
+++ b/keyboards/fingerpunch/fp_rgblight.c
@@ -20,10 +20,15 @@
#ifdef RGBLIGHT_ENABLE
void fp_rgb_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) {
+ xprintf("fp_rgb_set_hsv_and_mode: hue: %d, sat: %d, val: %d, mode: %d\n", hue, sat, val, mode);
rgblight_sethsv_noeeprom(hue, sat, val);
rgblight_mode_noeeprom(mode);
}
+void fp_post_init_rgblight(void) {
+
+}
+
layer_state_t fp_layer_state_set_rgblight(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
diff --git a/keyboards/fingerpunch/fp_rgblight.h b/keyboards/fingerpunch/fp_rgblight.h
index d0c4e71523..12f537d2e1 100644
--- a/keyboards/fingerpunch/fp_rgblight.h
+++ b/keyboards/fingerpunch/fp_rgblight.h
@@ -26,3 +26,4 @@
layer_state_t fp_layer_state_set_rgblight(layer_state_t state);
bool fp_process_record_rgblight(uint16_t keycode, keyrecord_t *record);
+void fp_post_init_rgblight(void);
diff --git a/keyboards/fingerpunch/luakeeb/config.h b/keyboards/fingerpunch/luakeeb/config.h
index 58f79216a8..34a74383d5 100644
--- a/keyboards/fingerpunch/luakeeb/config.h
+++ b/keyboards/fingerpunch/luakeeb/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
diff --git a/keyboards/fingerpunch/luakeeb/rules.mk b/keyboards/fingerpunch/luakeeb/rules.mk
index 021870b4ed..603a6ee88e 100644
--- a/keyboards/fingerpunch/luakeeb/rules.mk
+++ b/keyboards/fingerpunch/luakeeb/rules.mk
@@ -25,6 +25,7 @@ SPLIT_KEYBOARD = yes
LAYOUTS = split_3x5_4
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/pinkiesout/config.h b/keyboards/fingerpunch/pinkiesout/config.h
index f5d83033bd..2dcc179be6 100644
--- a/keyboards/fingerpunch/pinkiesout/config.h
+++ b/keyboards/fingerpunch/pinkiesout/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 60 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -66,7 +66,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 66
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 60 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/pinkiesout/rules.mk b/keyboards/fingerpunch/pinkiesout/rules.mk
index a49bc62d83..14e6457945 100644
--- a/keyboards/fingerpunch/pinkiesout/rules.mk
+++ b/keyboards/fingerpunch/pinkiesout/rules.mk
@@ -48,6 +48,7 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/rockon/config.h b/keyboards/fingerpunch/rockon/config.h
index 1cac5cc20d..d98f23db01 100644
--- a/keyboards/fingerpunch/rockon/config.h
+++ b/keyboards/fingerpunch/rockon/config.h
@@ -18,7 +18,6 @@ along with this program. If not, see .
#pragma once
#include "config_common.h"
-
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEFE
#define PRODUCT_ID 0x1200
@@ -38,7 +37,7 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
- #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level for RGBLIGHT_ENABLE */
+ #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
@@ -54,7 +53,7 @@ along with this program. If not, see .
#ifdef RGB_MATRIX_ENABLE
#define DRIVER_LED_TOTAL 66
#define RGB_MATRIX_CENTER {100, 32}
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 60 /* The maximum brightness level for RGB_MATRIX */
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/fingerpunch/rockon/rules.mk b/keyboards/fingerpunch/rockon/rules.mk
index 253c2a80ba..a55d4b419b 100644
--- a/keyboards/fingerpunch/rockon/rules.mk
+++ b/keyboards/fingerpunch/rockon/rules.mk
@@ -1,3 +1,4 @@
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/rockon_bp/rules.mk b/keyboards/fingerpunch/rockon_bp/rules.mk
index cfc85e9e1d..d69495c979 100644
--- a/keyboards/fingerpunch/rockon_bp/rules.mk
+++ b/keyboards/fingerpunch/rockon_bp/rules.mk
@@ -59,6 +59,7 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/sweeeeep/rules.mk b/keyboards/fingerpunch/sweeeeep/rules.mk
index 52b0a5baf1..9486c60f73 100644
--- a/keyboards/fingerpunch/sweeeeep/rules.mk
+++ b/keyboards/fingerpunch/sweeeeep/rules.mk
@@ -29,6 +29,7 @@ MOUSEKEY_ENABLE = no
SPLIT_KEYBOARD = yes # Use shared split_common code
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/keyboards/fingerpunch/ximi/config.h b/keyboards/fingerpunch/ximi/config.h
index 2434f88d80..8ca49731d4 100644
--- a/keyboards/fingerpunch/ximi/config.h
+++ b/keyboards/fingerpunch/ximi/config.h
@@ -137,16 +137,16 @@ along with this program. If not, see .
#define STARTUP_SONG SONG(PREONIC_SOUND)
#define DEFAULT_LAYER_SONGS \
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) }
-#endif
+#endif
#ifdef HAPTIC_ENABLE
#define FB_ERM_LRA 1
- #define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
- #define FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3
+ #define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
+ #define FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3
#define RATED_VOLTAGE 2
#define V_PEAK 2.8
#define V_RMS 2.0
- #define F_LRA 150 // resonance freq
+ #define F_LRA 150 // resonance freq
#define DRV_GREETING alert_750ms
#define NO_HAPTIC_ALPHA
#define NO_HAPTIC_LOCKKEYS
@@ -195,7 +195,7 @@ along with this program. If not, see .
#define PMW33XX_CPI 800
#define PMW33XX_CS_DIVISOR 8 // needs to be the same as the SHIFTREG_DIVISOR above
#define POINTING_DEVICE_INVERT_X // move to trackball specific config
-
+
/* SPI config for pmw3360 sensor. */
#define SPI_DRIVER SPID0
// #define SPI_SCK_PAL_MODE 5 // already defined in chibios
@@ -211,4 +211,4 @@ along with this program. If not, see .
#ifdef FP_TRACKBALL_RIGHT
#define POINTING_DEVICE_RIGHT
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/fingerpunch/ximi/rules.mk b/keyboards/fingerpunch/ximi/rules.mk
index 33a92d730c..e56e1ef84b 100644
--- a/keyboards/fingerpunch/ximi/rules.mk
+++ b/keyboards/fingerpunch/ximi/rules.mk
@@ -98,6 +98,7 @@ ifeq ($(strip $(PMW3360_ENABLE)), yes)
OPT_DEFS += -DFP_TRACKBALL_ENABLE
endif
+DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
index f94834530e..d43835be98 100644
--- a/quantum/process_keycode/process_rgb.c
+++ b/quantum/process_keycode/process_rgb.c
@@ -149,15 +149,6 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGB(shifted, rgb_matrix_decrease_speed, rgb_matrix_increase_speed);
#endif
return false;
-/* error I'm seeing:
-+Linking: .build/xoiviox_barobord_rgblight_pimoroni_ec11_sadekbaroudi.elf [ERRORS]
-+ |
-+ | /tmp/ccBHLnbF.ltrans0.ltrans.o: In function `process_rgb':
-+ | /home/sadek/vial-qmk/quantum/process_keycode/process_rgb.c:63:(.text.process_record+0xe50): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'
-+ | collect2: error: ld returned 1 exit status
-+ |
-+ */
-/* SADEK: Commenting out to reduce the number of items in this switch statement:
case RGB_MODE_PLAIN:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
@@ -220,7 +211,6 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
handleKeycodeRGBMode(RGBLIGHT_MODE_TWINKLE, RGBLIGHT_MODE_TWINKLE_end);
#endif
return false;
-*/
}
}
diff --git a/users/sadekbaroudi/config.h b/users/sadekbaroudi/config.h
index 138b3a61dc..ec1b53654d 100755
--- a/users/sadekbaroudi/config.h
+++ b/users/sadekbaroudi/config.h
@@ -30,6 +30,7 @@
// Read here for details: https://github.com/sadekbaroudi/qmk_firmware/tree/master/keyboards/fingerpunch#layer-lighting
#define FP_LAYER_LIGHTING_ENABLE
+#define FP_LAYER_LIGHTING_DYNAMIC_BASE_LAYER
// #define FP_LAYER_LIGHTING_AUTO_MOUSE_ENABLE
#define FP_POINTING_SNIPING_LAYER_ENABLE
diff --git a/users/sadekbaroudi/rules.mk b/users/sadekbaroudi/rules.mk
index 82744424b7..b7cd85ef2a 100755
--- a/users/sadekbaroudi/rules.mk
+++ b/users/sadekbaroudi/rules.mk
@@ -2,7 +2,7 @@ SRC += sadekbaroudi.c \
process_records.c
COMMAND_ENABLE = no # Commands for debug and configuration
-CONSOLE_ENABLE = no # Console for debug
+CONSOLE_ENABLE = yes # Console for debug
UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard
BACKLIGHT_ENABLE = no