aboutsummaryrefslogtreecommitdiff
path: root/keyboards/splitkb
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-08-21 13:34:44 -0700
committerGitHub <noreply@github.com>2021-08-21 13:34:44 -0700
commit58a5030661b57f1dd05693053df2eddadc285f64 (patch)
tree025a7a2d0dc6643ce806b72798c92139eafb4ca6 /keyboards/splitkb
parentda1c011afc67dab0049b30a4c021dc38a36cb9aa (diff)
downloadqmk_firmware-58a5030661b57f1dd05693053df2eddadc285f64.tar.gz
qmk_firmware-58a5030661b57f1dd05693053df2eddadc285f64.zip
[Keymap] Drashna's Improve OLEDs and custom Split code (#14063)
* Fill the oleds with right mods * Enable double mods on x32 oleds * Disable forced NKRO * Make oleds fancy only on good MCUs * Overhaul oled display * Further enhance oled, with kitty! * Final oled form * Not working transport * Transport id of woring * Add acceleration * fix button placement for accel macro * Fix accelartion location and behavior * Remove OLED sync code * Fix alignment issue * Remove audio hack * Fix up zima keymap * Add matrix slave scan function and cleanup drashna.h * Clean up user space * Allow userspace sync to be disable-able * Fix weird issue with audio * Fix alignment issue with user split sync * Disable second rgb matrix task * Disable additional animations * Change dynamic keymap settings * Hacky fix for borked corne * Add Blackpill (F411) support to tractyl manuform * remove manual via eeprom reset * Remove all references to rgblight twinkle * Fix issues with config processing
Diffstat (limited to 'keyboards/splitkb')
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/config.h2
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/keymap.c36
2 files changed, 30 insertions, 8 deletions
diff --git a/keyboards/splitkb/zima/keymaps/drashna/config.h b/keyboards/splitkb/zima/keymaps/drashna/config.h
index 91d657eda..133ab6a91 100644
--- a/keyboards/splitkb/zima/keymaps/drashna/config.h
+++ b/keyboards/splitkb/zima/keymaps/drashna/config.h
@@ -30,3 +30,5 @@
30// # define OLED_LOGO_CORNE 30// # define OLED_LOGO_CORNE
31// # define OLED_LOGO_GOTHAM 31// # define OLED_LOGO_GOTHAM
32#define OLED_LOGO_SCIFI 32#define OLED_LOGO_SCIFI
33
34#define ENCODER_RESOLUTION 2
diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
index 6e198e3dd..29d03ec91 100644
--- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c
+++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
@@ -15,7 +15,6 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18#include <stdio.h>
19 18
20#ifdef HAPTIC_ENABLE 19#ifdef HAPTIC_ENABLE
21# include "haptic.h" 20# include "haptic.h"
@@ -90,15 +89,35 @@ void oled_task_user(void) {
90 oled_scroll_off(); 89 oled_scroll_off();
91 oled_write_P(PSTR("SplitKB's Zima"), false); 90 oled_write_P(PSTR("SplitKB's Zima"), false);
92 char layer[2] = {0}; 91 char layer[2] = {0};
93 snprintf(layer, sizeof(layer), "%d", get_highest_layer(layer_state)); 92 uint8_t n = get_highest_layer(layer_state);
93 layer[1] = '\0';
94 layer[0] = '0' + n % 10;
94 oled_write_P(PSTR(" L:"), false); 95 oled_write_P(PSTR(" L:"), false);
95 oled_write_ln(layer, false); 96 oled_write_ln(layer, false);
96 oled_write_ln_P(PSTR("--------------"), false); 97 oled_write_ln_P(PSTR("--------------"), false);
97 if (rgblight_is_enabled()) { 98 if (rgblight_is_enabled()) {
98 oled_write_P(PSTR("HSV: "), false); 99 oled_write_P(PSTR("HSV: "), false);
99 char rgbs[14]; 100 char hsv_char[4];
100 snprintf(rgbs, sizeof(rgbs), "%3d, %3d, %3d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); 101 n = rgblight_get_hue();
101 oled_write_ln(rgbs, false); 102 hsv_char[3] = '\0';
103 hsv_char[2] = '0' + n % 10;
104 hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
105 hsv_char[0] = n / 10 ? '0' + n / 10 : ' ';
106 oled_write(hsv_char, false);
107 oled_write_P(PSTR(", "), false);
108 n = rgblight_get_sat();
109 hsv_char[3] = '\0';
110 hsv_char[2] = '0' + n % 10;
111 hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
112 hsv_char[0] = n / 10 ? '0' + n / 10 : ' ';
113 oled_write(hsv_char, false);
114 oled_write_P(PSTR(", "), false);
115 n = rgblight_get_val();
116 hsv_char[3] = '\0';
117 hsv_char[2] = '0' + n % 10;
118 hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
119 hsv_char[0] = n / 10 ? '0' + n / 10 : ' ';
120 oled_write_ln(hsv_char, false);
102 } else { 121 } else {
103 oled_write_ln_P(PSTR("RGB LIGHT DISABLED"), false); 122 oled_write_ln_P(PSTR("RGB LIGHT DISABLED"), false);
104 } 123 }
@@ -125,10 +144,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
125} 144}
126 145
127bool encoder_update_user(uint8_t index, bool clockwise) { 146bool encoder_update_user(uint8_t index, bool clockwise) {
147 oled_timer = timer_read32();
128 if (clockwise) { 148 if (clockwise) {
129 tap_code16(KC_VOLU); 149 tap_code_delay(KC_VOLU, 10);
130 } else { 150 } else {
131 tap_code16(KC_VOLD); 151 tap_code_delay(KC_VOLD, 10);
132 } 152 }
133 return true; 153 return false;
134} 154}