]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #813 from fredizzimo/add_cluecard_rgb_effects
authorJack Humbert <jack.humb@gmail.com>
Mon, 10 Oct 2016 04:19:34 +0000 (00:19 -0400)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2016 04:19:34 +0000 (00:19 -0400)
Add a Cluecard keymap for testing the RGB effects

keyboards/cluecard/keymaps/default/readme.md
keyboards/cluecard/keymaps/rgb_effects/Makefile [new file with mode: 0644]
keyboards/cluecard/keymaps/rgb_effects/config.h [new file with mode: 0644]
keyboards/cluecard/keymaps/rgb_effects/keymap.c [new file with mode: 0644]
keyboards/cluecard/keymaps/rgb_effects/readme.md [new file with mode: 0644]
quantum/rgblight.c
quantum/rgblight.h

index 9e3b97beac962d72a60c3386bdf80aac9c340767..fa4e8ccad4c8543656c02fdb2a945c9d1033b992 100644 (file)
@@ -1 +1,5 @@
 # The default keymap for cluecard
+
+Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. 
+So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness
+buttons. You can of course also turn them on and off with the on/off button.
diff --git a/keyboards/cluecard/keymaps/rgb_effects/Makefile b/keyboards/cluecard/keymaps/rgb_effects/Makefile
new file mode 100644 (file)
index 0000000..00670c0
--- /dev/null
@@ -0,0 +1,21 @@
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no       # Audio control and System control(+450)
+CONSOLE_ENABLE = yes         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes        # Enable WS2812 RGB underlight.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h
new file mode 100644 (file)
index 0000000..e88847d
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+#define RGBLIGHT_TIMER
+#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
+#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
+#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2
+
+#endif
diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c
new file mode 100644 (file)
index 0000000..74c95ce
--- /dev/null
@@ -0,0 +1,28 @@
+#include "cluecard.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+       [0] = KEYMAP(
+               RGB_TOG,        RGB_SAI,        RGB_VAI, \
+                       RGB_HUD,        RGB_HUI,         \
+               RGB_MOD,        RGB_SAD,        RGB_VAD, \
+               BL_STEP,                                 \
+               KC_NO,   KC_NO,   KC_NO                  \
+       )
+};
+
+const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85};
+const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+}
diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md
new file mode 100644 (file)
index 0000000..949cac3
--- /dev/null
@@ -0,0 +1,7 @@
+# RGB effect test keymap for cluecard
+
+This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each
+effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check
+the `rgblight.c` file.
+
+The hue, saturation and brightness buttons will work depending on which effect is active.
index f82e3ec5589a268a8ca4f410b990346c9f1e10a3..9eac87a207912b603baa1ef72482e53c6a59b8ac 100644 (file)
@@ -42,10 +42,16 @@ const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = {
   37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11,
   10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0
 };
+
+__attribute__ ((weak))
 const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
+__attribute__ ((weak))
 const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
+__attribute__ ((weak))
 const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
+__attribute__ ((weak))
 const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
+__attribute__ ((weak))
 const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
 
 rgblight_config_t rgblight_config;
index def26c428cdf270ba14dc7f7e75ac4ed8fa25010..17f04ffcf288304eacdf2ebfa65ff8cf2c163370 100644 (file)
 #include "eeconfig.h"
 #include "light_ws2812.h"
 
+extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
+
 typedef union {
   uint32_t raw;
   struct {