diff options
| author | Sendy Aditya Suryana <sendzation@gmail.com> | 2021-12-27 17:06:35 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-27 21:06:35 +1100 |
| commit | dad7424becdb10d1dc3ad70a456fc40513255e71 (patch) | |
| tree | 87527dad8f7f1d8ba8361ae45ff437da61e723a5 | |
| parent | ce0ca94600b94bafa132dacccc662615e8a9befe (diff) | |
| download | qmk_firmware-dad7424becdb10d1dc3ad70a456fc40513255e71.tar.gz qmk_firmware-dad7424becdb10d1dc3ad70a456fc40513255e71.zip | |
[Keyboard][Update] Add RGB Backlight feature to Pix (#14057)
* Initiate RGB Support
* Add RGB Support for PIX
* Revert Encoder pin assignment
* Lower default RGB LED to 15
* Use Left shift for far left key
* Replicate via keymap to default keymap
| -rw-r--r-- | keyboards/sendyyeah/pix/config.h | 26 | ||||
| -rw-r--r-- | keyboards/sendyyeah/pix/keymaps/default/glcdfont.c | 24 | ||||
| -rw-r--r-- | keyboards/sendyyeah/pix/keymaps/default/keymap.c | 65 | ||||
| -rw-r--r-- | keyboards/sendyyeah/pix/keymaps/via/keymap.c | 65 | ||||
| -rw-r--r-- | keyboards/sendyyeah/pix/rules.mk | 2 |
5 files changed, 147 insertions, 35 deletions
diff --git a/keyboards/sendyyeah/pix/config.h b/keyboards/sendyyeah/pix/config.h index a9c3080d8..86c6d26e1 100644 --- a/keyboards/sendyyeah/pix/config.h +++ b/keyboards/sendyyeah/pix/config.h | |||
| @@ -49,15 +49,17 @@ | |||
| 49 | /* Locking resynchronize hack */ | 49 | /* Locking resynchronize hack */ |
| 50 | #define LOCKING_RESYNC_ENABLE | 50 | #define LOCKING_RESYNC_ENABLE |
| 51 | 51 | ||
| 52 | // #define RGB_DI_PIN B5 | 52 | #define USB_MAX_POWER_CONSUMPTION 500 |
| 53 | // #ifdef RGB_DI_PIN | 53 | |
| 54 | // #define RGBLED_NUM 5 | 54 | #define RGB_DI_PIN B5 |
| 55 | // #define RGBLIGHT_HUE_STEP 8 | 55 | #ifdef RGB_DI_PIN |
| 56 | // #define RGBLIGHT_SAT_STEP 8 | 56 | #define RGBLED_NUM 15 |
| 57 | // #define RGBLIGHT_VAL_STEP 8 | 57 | #define RGBLIGHT_HUE_STEP 8 |
| 58 | // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | 58 | #define RGBLIGHT_SAT_STEP 8 |
| 59 | // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | 59 | #define RGBLIGHT_VAL_STEP 8 |
| 60 | // #define RGBLIGHT_ANIMATIONS | 60 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ |
| 61 | // #define RGBLIGHT_LAYERS | 61 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ |
| 62 | // #define RGBLIGHT_LAYER_BLINK | 62 | #define RGBLIGHT_ANIMATIONS |
| 63 | // #endif | 63 | #define RGBLIGHT_LAYERS |
| 64 | #define RGBLIGHT_LAYER_BLINK | ||
| 65 | #endif | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c b/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c index 7af69f796..53f25b92e 100644 --- a/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c +++ b/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c | |||
| @@ -165,11 +165,11 @@ const unsigned char font[] PROGMEM = { | |||
| 165 | 0xF1, 0xF9, 0xFD, 0x01, 0x01, 0xFE, | 165 | 0xF1, 0xF9, 0xFD, 0x01, 0x01, 0xFE, |
| 166 | 0xFE, 0x01, 0x01, 0xFD, 0xF9, 0xF1, | 166 | 0xFE, 0x01, 0x01, 0xFD, 0xF9, 0xF1, |
| 167 | 0x61, 0x01, 0xFD, 0x01, 0x01, 0xFE, | 167 | 0x61, 0x01, 0xFD, 0x01, 0x01, 0xFE, |
| 168 | 0xFE, 0x01, 0xF9, 0xF9, 0x31, 0xE1, | ||
| 169 | 0xE1, 0x31, 0xF9, 0xF9, 0x01, 0xFE, | ||
| 170 | 0xFE, 0x01, 0xF9, 0xF9, 0x61, 0x61, | ||
| 171 | 0x61, 0x61, 0xF9, 0xF9, 0x01, 0xFE, | ||
| 168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 169 | 0xF0, 0x08, 0x04, 0xC4, 0x24, 0x24, | ||
| 170 | 0x24, 0xC4, 0x04, 0x08, 0xF0, 0x00, | ||
| 171 | 0xF0, 0xF8, 0xFC, 0x3C, 0xDC, 0xDC, | ||
| 172 | 0xDC, 0x3C, 0xFC, 0xF8, 0xF0, 0x00, | ||
| 173 | 0xFE, 0xC1, 0xC1, 0xC9, 0xC5, 0xDD, | 173 | 0xFE, 0xC1, 0xC1, 0xC9, 0xC5, 0xDD, |
| 174 | 0xC5, 0xC9, 0xC1, 0xC1, 0xFE, 0x00, | 174 | 0xC5, 0xC9, 0xC1, 0xC1, 0xFE, 0x00, |
| 175 | 0xFC, 0xFE, 0xFE, 0xEE, 0xF6, 0xC6, | 175 | 0xFC, 0xFE, 0xFE, 0xEE, 0xF6, 0xC6, |
| @@ -197,15 +197,15 @@ const unsigned char font[] PROGMEM = { | |||
| 197 | 0x08, 0x09, 0x0B, 0x08, 0x08, 0x07, | 197 | 0x08, 0x09, 0x0B, 0x08, 0x08, 0x07, |
| 198 | 0x07, 0x08, 0x08, 0x0B, 0x09, 0x08, | 198 | 0x07, 0x08, 0x08, 0x0B, 0x09, 0x08, |
| 199 | 0x08, 0x08, 0x0B, 0x08, 0x08, 0x07, | 199 | 0x08, 0x08, 0x0B, 0x08, 0x08, 0x07, |
| 200 | 0x07, 0x08, 0x09, 0x09, 0x08, 0x08, | ||
| 201 | 0x08, 0x08, 0x09, 0x09, 0x08, 0x07, | ||
| 202 | 0x07, 0x08, 0x09, 0x09, 0x08, 0x08, | ||
| 203 | 0x08, 0x08, 0x09, 0x09, 0x08, 0x07, | ||
| 200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 201 | 0x07, 0x08, 0x10, 0x13, 0x11, 0x11, | ||
| 202 | 0x11, 0x13, 0x10, 0x08, 0x07, 0x00, | ||
| 203 | 0x07, 0x0F, 0x1F, 0x1C, 0x1E, 0x1E, | ||
| 204 | 0x1E, 0x1C, 0x1F, 0x0F, 0x07, 0x00, | ||
| 205 | 0xFE, 0x01, 0xF1, 0xF9, 0xFD, 0xFD, | 205 | 0xFE, 0x01, 0xF1, 0xF9, 0xFD, 0xFD, |
| 206 | 0x05, 0x05, 0x09, 0xF1, 0x01, 0xFE, | 206 | 0x05, 0x05, 0x09, 0xF1, 0x01, 0xFE, |
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 207 | 0xFE, 0x01, 0x39, 0x7D, 0x6D, 0x6D, |
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 208 | 0x6D, 0x6D, 0xED, 0xC9, 0x01, 0xFE, |
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| @@ -236,8 +236,8 @@ const unsigned char font[] PROGMEM = { | |||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 237 | 0x07, 0x08, 0x08, 0x09, 0x0B, 0x0B, | 237 | 0x07, 0x08, 0x08, 0x09, 0x0B, 0x0B, |
| 238 | 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, | 238 | 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, |
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 239 | 0x07, 0x08, 0x09, 0x0B, 0x0B, 0x0B, |
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 240 | 0x0B, 0x0B, 0x0B, 0x09, 0x08, 0x07, |
| 241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c index bcaf52d53..951aadeae 100644 --- a/keyboards/sendyyeah/pix/keymaps/default/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c | |||
| @@ -16,11 +16,12 @@ | |||
| 16 | 16 | ||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | #define LAYERNUM 2 | 19 | #define LAYERNUM 3 |
| 20 | 20 | ||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), | 22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), |
| 23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(0)) | 23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(2)), |
| 24 | [2] = LAYOUT(KC_LSFT, RGB_MOD, RGB_HUI, RGB_SAI, TO(0)) | ||
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| 26 | int get_icon_start_position(int key_position) { | 27 | int get_icon_start_position(int key_position) { |
| @@ -44,13 +45,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 44 | oled_write_P(UP_ICON, false); | 45 | oled_write_P(UP_ICON, false); |
| 45 | } else { | 46 | } else { |
| 46 | tap_code(KC_VOLD); | 47 | tap_code(KC_VOLD); |
| 47 | |||
| 48 | oled_set_cursor(get_icon_start_position(7), 2); | 48 | oled_set_cursor(get_icon_start_position(7), 2); |
| 49 | oled_write_P(PSTR(" "), false); | 49 | oled_write_P(PSTR(" "), false); |
| 50 | oled_set_cursor(get_icon_start_position(7), 3); | 50 | oled_set_cursor(get_icon_start_position(7), 3); |
| 51 | oled_write_P(DOWN_ICON, false); | 51 | oled_write_P(DOWN_ICON, false); |
| 52 | } | 52 | } |
| 53 | } else { | 53 | } else if (layer_state_is(1)) { |
| 54 | if (clockwise) { | 54 | if (clockwise) { |
| 55 | tap_code(KC_BRIU); | 55 | tap_code(KC_BRIU); |
| 56 | oled_set_cursor(get_icon_start_position(7), 3); | 56 | oled_set_cursor(get_icon_start_position(7), 3); |
| @@ -64,6 +64,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 64 | oled_set_cursor(get_icon_start_position(7), 3); | 64 | oled_set_cursor(get_icon_start_position(7), 3); |
| 65 | oled_write_P(DOWN_ICON, false); | 65 | oled_write_P(DOWN_ICON, false); |
| 66 | } | 66 | } |
| 67 | } else if (layer_state_is(2)) { | ||
| 68 | if (clockwise) { | ||
| 69 | rgblight_increase_val(); | ||
| 70 | oled_set_cursor(get_icon_start_position(7), 3); | ||
| 71 | oled_write_P(PSTR(" "), false); | ||
| 72 | oled_set_cursor(get_icon_start_position(7), 2); | ||
| 73 | oled_write_P(UP_ICON, false); | ||
| 74 | } else { | ||
| 75 | rgblight_decrease_val(); | ||
| 76 | oled_set_cursor(get_icon_start_position(7), 2); | ||
| 77 | oled_write_P(PSTR(" "), false); | ||
| 78 | oled_set_cursor(get_icon_start_position(7), 3); | ||
| 79 | oled_write_P(DOWN_ICON, false); | ||
| 80 | } | ||
| 67 | } | 81 | } |
| 68 | } | 82 | } |
| 69 | return true; | 83 | return true; |
| @@ -174,7 +188,34 @@ void draw_brightness_icon(int key_position, int row) { | |||
| 174 | oled_write_P(ICON_BRIGHTNESS_1, false); | 188 | oled_write_P(ICON_BRIGHTNESS_1, false); |
| 175 | } | 189 | } |
| 176 | 190 | ||
| 177 | bool oled_task_user(void) { | 191 | void draw_mode_icon(int key_position, int row) { |
| 192 | static const char PROGMEM ICON_MODE_0[] = {0x94, 0x95, 0}; | ||
| 193 | static const char PROGMEM ICON_MODE_1[] = {0xB4, 0xB5, 0}; | ||
| 194 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 195 | oled_write_P(ICON_MODE_0, false); | ||
| 196 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 197 | oled_write_P(ICON_MODE_1, false); | ||
| 198 | } | ||
| 199 | |||
| 200 | void draw_hue_icon(int key_position, int row) { | ||
| 201 | static const char PROGMEM ICON_HUE_0[] = {0x96, 0x97, 0}; | ||
| 202 | static const char PROGMEM ICON_HUE_1[] = {0xB6, 0xB7, 0}; | ||
| 203 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 204 | oled_write_P(ICON_HUE_0, false); | ||
| 205 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 206 | oled_write_P(ICON_HUE_1, false); | ||
| 207 | } | ||
| 208 | |||
| 209 | void draw_sat_icon(int key_position, int row) { | ||
| 210 | static const char PROGMEM ICON_SAT_0[] = {0xBB, 0xBC, 0}; | ||
| 211 | static const char PROGMEM ICON_SAT_1[] = {0xDB, 0xDC, 0}; | ||
| 212 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 213 | oled_write_P(ICON_SAT_0, false); | ||
| 214 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 215 | oled_write_P(ICON_SAT_1, false); | ||
| 216 | } | ||
| 217 | |||
| 218 | void oled_task_user(void) { | ||
| 178 | // Host Keyboard Layer Status | 219 | // Host Keyboard Layer Status |
| 179 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; | 220 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; |
| 180 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; | 221 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; |
| @@ -189,6 +230,9 @@ bool oled_task_user(void) { | |||
| 189 | case 1: | 230 | case 1: |
| 190 | oled_write_P(PSTR("2ND "), false); | 231 | oled_write_P(PSTR("2ND "), false); |
| 191 | break; | 232 | break; |
| 233 | case 2: | ||
| 234 | oled_write_P(PSTR("3RD "), false); | ||
| 235 | break; | ||
| 192 | default: | 236 | default: |
| 193 | // Or use the write_ln shortcut over adding '\n' to the end of your string | 237 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
| 194 | oled_write_P(PSTR("UNDF"), false); | 238 | oled_write_P(PSTR("UNDF"), false); |
| @@ -204,6 +248,9 @@ bool oled_task_user(void) { | |||
| 204 | case 1: | 248 | case 1: |
| 205 | oled_write_P(PSTR("BRGT"), false); | 249 | oled_write_P(PSTR("BRGT"), false); |
| 206 | break; | 250 | break; |
| 251 | case 2: | ||
| 252 | oled_write_P(PSTR("RGB "), false); | ||
| 253 | break; | ||
| 207 | default: | 254 | default: |
| 208 | // Or use the write_ln shortcut over adding '\n' to the end of your string | 255 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
| 209 | oled_write_P(PSTR("UNDF"), false); | 256 | oled_write_P(PSTR("UNDF"), false); |
| @@ -227,6 +274,14 @@ bool oled_task_user(void) { | |||
| 227 | draw_lower_icon(5, 2); | 274 | draw_lower_icon(5, 2); |
| 228 | draw_brightness_icon(6, 2); | 275 | draw_brightness_icon(6, 2); |
| 229 | break; | 276 | break; |
| 277 | case 2: | ||
| 278 | draw_raise_icon(1, 2); | ||
| 279 | draw_mode_icon(2, 2); | ||
| 280 | draw_hue_icon(3, 2); | ||
| 281 | draw_sat_icon(4, 2); | ||
| 282 | draw_lower_icon(5, 2); | ||
| 283 | draw_brightness_icon(6, 2); | ||
| 284 | break; | ||
| 230 | } | 285 | } |
| 231 | 286 | ||
| 232 | return false; | 287 | return false; |
diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c index bcaf52d53..951aadeae 100644 --- a/keyboards/sendyyeah/pix/keymaps/via/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c | |||
| @@ -16,11 +16,12 @@ | |||
| 16 | 16 | ||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | #define LAYERNUM 2 | 19 | #define LAYERNUM 3 |
| 20 | 20 | ||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), | 22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), |
| 23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(0)) | 23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(2)), |
| 24 | [2] = LAYOUT(KC_LSFT, RGB_MOD, RGB_HUI, RGB_SAI, TO(0)) | ||
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| 26 | int get_icon_start_position(int key_position) { | 27 | int get_icon_start_position(int key_position) { |
| @@ -44,13 +45,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 44 | oled_write_P(UP_ICON, false); | 45 | oled_write_P(UP_ICON, false); |
| 45 | } else { | 46 | } else { |
| 46 | tap_code(KC_VOLD); | 47 | tap_code(KC_VOLD); |
| 47 | |||
| 48 | oled_set_cursor(get_icon_start_position(7), 2); | 48 | oled_set_cursor(get_icon_start_position(7), 2); |
| 49 | oled_write_P(PSTR(" "), false); | 49 | oled_write_P(PSTR(" "), false); |
| 50 | oled_set_cursor(get_icon_start_position(7), 3); | 50 | oled_set_cursor(get_icon_start_position(7), 3); |
| 51 | oled_write_P(DOWN_ICON, false); | 51 | oled_write_P(DOWN_ICON, false); |
| 52 | } | 52 | } |
| 53 | } else { | 53 | } else if (layer_state_is(1)) { |
| 54 | if (clockwise) { | 54 | if (clockwise) { |
| 55 | tap_code(KC_BRIU); | 55 | tap_code(KC_BRIU); |
| 56 | oled_set_cursor(get_icon_start_position(7), 3); | 56 | oled_set_cursor(get_icon_start_position(7), 3); |
| @@ -64,6 +64,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 64 | oled_set_cursor(get_icon_start_position(7), 3); | 64 | oled_set_cursor(get_icon_start_position(7), 3); |
| 65 | oled_write_P(DOWN_ICON, false); | 65 | oled_write_P(DOWN_ICON, false); |
| 66 | } | 66 | } |
| 67 | } else if (layer_state_is(2)) { | ||
| 68 | if (clockwise) { | ||
| 69 | rgblight_increase_val(); | ||
| 70 | oled_set_cursor(get_icon_start_position(7), 3); | ||
| 71 | oled_write_P(PSTR(" "), false); | ||
| 72 | oled_set_cursor(get_icon_start_position(7), 2); | ||
| 73 | oled_write_P(UP_ICON, false); | ||
| 74 | } else { | ||
| 75 | rgblight_decrease_val(); | ||
| 76 | oled_set_cursor(get_icon_start_position(7), 2); | ||
| 77 | oled_write_P(PSTR(" "), false); | ||
| 78 | oled_set_cursor(get_icon_start_position(7), 3); | ||
| 79 | oled_write_P(DOWN_ICON, false); | ||
| 80 | } | ||
| 67 | } | 81 | } |
| 68 | } | 82 | } |
| 69 | return true; | 83 | return true; |
| @@ -174,7 +188,34 @@ void draw_brightness_icon(int key_position, int row) { | |||
| 174 | oled_write_P(ICON_BRIGHTNESS_1, false); | 188 | oled_write_P(ICON_BRIGHTNESS_1, false); |
| 175 | } | 189 | } |
| 176 | 190 | ||
| 177 | bool oled_task_user(void) { | 191 | void draw_mode_icon(int key_position, int row) { |
| 192 | static const char PROGMEM ICON_MODE_0[] = {0x94, 0x95, 0}; | ||
| 193 | static const char PROGMEM ICON_MODE_1[] = {0xB4, 0xB5, 0}; | ||
| 194 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 195 | oled_write_P(ICON_MODE_0, false); | ||
| 196 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 197 | oled_write_P(ICON_MODE_1, false); | ||
| 198 | } | ||
| 199 | |||
| 200 | void draw_hue_icon(int key_position, int row) { | ||
| 201 | static const char PROGMEM ICON_HUE_0[] = {0x96, 0x97, 0}; | ||
| 202 | static const char PROGMEM ICON_HUE_1[] = {0xB6, 0xB7, 0}; | ||
| 203 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 204 | oled_write_P(ICON_HUE_0, false); | ||
| 205 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 206 | oled_write_P(ICON_HUE_1, false); | ||
| 207 | } | ||
| 208 | |||
| 209 | void draw_sat_icon(int key_position, int row) { | ||
| 210 | static const char PROGMEM ICON_SAT_0[] = {0xBB, 0xBC, 0}; | ||
| 211 | static const char PROGMEM ICON_SAT_1[] = {0xDB, 0xDC, 0}; | ||
| 212 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
| 213 | oled_write_P(ICON_SAT_0, false); | ||
| 214 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
| 215 | oled_write_P(ICON_SAT_1, false); | ||
| 216 | } | ||
| 217 | |||
| 218 | void oled_task_user(void) { | ||
| 178 | // Host Keyboard Layer Status | 219 | // Host Keyboard Layer Status |
| 179 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; | 220 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; |
| 180 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; | 221 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; |
| @@ -189,6 +230,9 @@ bool oled_task_user(void) { | |||
| 189 | case 1: | 230 | case 1: |
| 190 | oled_write_P(PSTR("2ND "), false); | 231 | oled_write_P(PSTR("2ND "), false); |
| 191 | break; | 232 | break; |
| 233 | case 2: | ||
| 234 | oled_write_P(PSTR("3RD "), false); | ||
| 235 | break; | ||
| 192 | default: | 236 | default: |
| 193 | // Or use the write_ln shortcut over adding '\n' to the end of your string | 237 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
| 194 | oled_write_P(PSTR("UNDF"), false); | 238 | oled_write_P(PSTR("UNDF"), false); |
| @@ -204,6 +248,9 @@ bool oled_task_user(void) { | |||
| 204 | case 1: | 248 | case 1: |
| 205 | oled_write_P(PSTR("BRGT"), false); | 249 | oled_write_P(PSTR("BRGT"), false); |
| 206 | break; | 250 | break; |
| 251 | case 2: | ||
| 252 | oled_write_P(PSTR("RGB "), false); | ||
| 253 | break; | ||
| 207 | default: | 254 | default: |
| 208 | // Or use the write_ln shortcut over adding '\n' to the end of your string | 255 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
| 209 | oled_write_P(PSTR("UNDF"), false); | 256 | oled_write_P(PSTR("UNDF"), false); |
| @@ -227,6 +274,14 @@ bool oled_task_user(void) { | |||
| 227 | draw_lower_icon(5, 2); | 274 | draw_lower_icon(5, 2); |
| 228 | draw_brightness_icon(6, 2); | 275 | draw_brightness_icon(6, 2); |
| 229 | break; | 276 | break; |
| 277 | case 2: | ||
| 278 | draw_raise_icon(1, 2); | ||
| 279 | draw_mode_icon(2, 2); | ||
| 280 | draw_hue_icon(3, 2); | ||
| 281 | draw_sat_icon(4, 2); | ||
| 282 | draw_lower_icon(5, 2); | ||
| 283 | draw_brightness_icon(6, 2); | ||
| 284 | break; | ||
| 230 | } | 285 | } |
| 231 | 286 | ||
| 232 | return false; | 287 | return false; |
diff --git a/keyboards/sendyyeah/pix/rules.mk b/keyboards/sendyyeah/pix/rules.mk index 7f4a71aab..c5eb6c7bc 100644 --- a/keyboards/sendyyeah/pix/rules.mk +++ b/keyboards/sendyyeah/pix/rules.mk | |||
| @@ -14,7 +14,7 @@ CONSOLE_ENABLE = no # Console for debug | |||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | 14 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 15 | NKRO_ENABLE = no # Enable N-Key Rollover | 15 | NKRO_ENABLE = no # Enable N-Key Rollover |
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
| 18 | AUDIO_ENABLE = no # Audio output | 18 | AUDIO_ENABLE = no # Audio output |
| 19 | ENCODER_ENABLE = yes | 19 | ENCODER_ENABLE = yes |
| 20 | OLED_ENABLE = yes | 20 | OLED_ENABLE = yes |
