summaryrefslogtreecommitdiffstats
path: root/keyboards/maxr1998/pulse4k/pulse4k.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-02-11 13:31:19 +1100
committerGitHub <noreply@github.com>2022-02-11 02:31:19 +0000
commit2bc4a216dfbb83a6d2b57da397d370210087cff5 (patch)
tree9a16383f77159d03bd4ec5ca4ad8918f766ea16b /keyboards/maxr1998/pulse4k/pulse4k.c
parent63c310f6fd205e6332d69a718b2a295ee7792675 (diff)
maxr1998/pulse4k: Move Combo code to keymap level (#16301)
* maxr1998/pulse4k: Move Combo code to keymap level * Reorder code
Diffstat (limited to 'keyboards/maxr1998/pulse4k/pulse4k.c')
-rw-r--r--keyboards/maxr1998/pulse4k/pulse4k.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c
index 21bbe5d68e..f31eb6db37 100644
--- a/keyboards/maxr1998/pulse4k/pulse4k.c
+++ b/keyboards/maxr1998/pulse4k/pulse4k.c
@@ -16,44 +16,14 @@
*/
#include "pulse4k.h"
-#include "rgblight.h"
-
-enum combo_events {
- LED_ADJUST
-};
-
-extern const uint16_t PROGMEM led_adjust_combo[3];
-
-combo_t key_combos[COMBO_COUNT] = {
- [LED_ADJUST] = COMBO_ACTION(led_adjust_combo)
-};
-
-bool led_adjust_active = false;
-
-void process_combo_event(uint16_t combo_index, bool pressed) {
- if (combo_index == LED_ADJUST) {
- led_adjust_active = pressed;
- }
-}
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
+
if (index == 0) {
- if (led_adjust_active) {
- if (clockwise) {
- rgblight_increase_val();
- } else {
- rgblight_decrease_val();
- }
- } else encoder_one_update(clockwise);
+ encoder_one_update(clockwise);
} else if (index == 1) {
- if (led_adjust_active) {
- if (clockwise) {
- rgblight_increase_hue();
- } else {
- rgblight_decrease_hue();
- }
- } else encoder_two_update(clockwise);
+ encoder_two_update(clockwise);
}
return true;
}