From 4c75259a9c6585dee9d24d69a39c2e227e34ff92 Mon Sep 17 00:00:00 2001 From: Markus Knutsson Date: Tue, 9 Jan 2024 11:17:46 +0100 Subject: [PATCH] Lotus 58 Glow - Added Auto shift to OLED, corrected OLED orientation (#22424) Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- keyboards/tweetydabird/lotus58/info.json | 22 +++++++------- .../lotus58/keymaps/default/keymap.c | 29 +++++++++++++------ keyboards/tweetydabird/lotus58/lotus58.c | 2 +- keyboards/tweetydabird/lotus58/rules.mk | 1 + 4 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 keyboards/tweetydabird/lotus58/rules.mk diff --git a/keyboards/tweetydabird/lotus58/info.json b/keyboards/tweetydabird/lotus58/info.json index 4e41fcc7bde5..751f57c5198f 100644 --- a/keyboards/tweetydabird/lotus58/info.json +++ b/keyboards/tweetydabird/lotus58/info.json @@ -16,11 +16,11 @@ "bootmagic": true, "command": false, "console": false, + "encoder": true, "extrakey": true, "mousekey": true, "nkro": true, "oled": true, - "encoder": true, "rgblight": true, "split": true, "tri_layer": true @@ -33,13 +33,10 @@ "processor": "atmega32u4", "rgblight": { "led_count": 70, - "split": true, - "split_count": [35, 35], + "max_brightness": 175, "sleep": true, - "max_brightness": 175 - }, - "ws2812": { - "pin": "D3" + "split": true, + "split_count": [35, 35] }, "split": { "bootmagic": { @@ -70,10 +67,13 @@ }, "url": "https://lectronz.com/stores/tweetys-wild-thinking", "usb": { - "vid": "0xFEED", - "pid": "0x23B0", "device_version": "1.2.3", - "force_nkro": true + "force_nkro": true, + "pid": "0x23B0", + "vid": "0xFEED" + }, + "ws2812": { + "pin": "D3" }, "layouts": { "LAYOUT": { @@ -141,4 +141,4 @@ ] } } -} +} \ No newline at end of file diff --git a/keyboards/tweetydabird/lotus58/keymaps/default/keymap.c b/keyboards/tweetydabird/lotus58/keymaps/default/keymap.c index 2a74f1b9a9db..4cb6b4cfe79e 100644 --- a/keyboards/tweetydabird/lotus58/keymaps/default/keymap.c +++ b/keyboards/tweetydabird/lotus58/keymaps/default/keymap.c @@ -4,10 +4,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, -LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_UP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_RGHT), + QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_UP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_RGHT), KC_LGUI, TG(2), KC_LALT, LSFT_T(KC_SPC), RSFT_T(KC_ENT), KC_RALT, TG(1), RGUI_T(KC_BSPC) ), @@ -28,8 +28,8 @@ LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC ), [3] = LAYOUT( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAI, RGB_TOG, - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD,RGB_SAD, RGB_M_P, + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, NK_TOGG, AC_TOGG, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAI, RGB_TOG, + QK_RBT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD,RGB_SAD, RGB_M_P, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_VAI, RGB_M_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_VAD, RGB_M_R, _______, _______, _______, _______, _______, _______, _______, _______ @@ -39,9 +39,9 @@ LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; #endif @@ -76,6 +76,16 @@ static void print_status_narrow(void) { led_t led_usb_state = host_keyboard_led_state(); oled_write_ln_P(PSTR("Caps- lock"), led_usb_state.caps_lock); +#ifdef AUTO_SHIFT_ENABLE + + bool autoshift = get_autoshift_state(); + oled_advance_page(true); + oled_write_P(PSTR("Auto-Shift"), autoshift); + oled_advance_page(true); + +#endif + + } bool oled_task_user(void) { @@ -83,4 +93,5 @@ bool oled_task_user(void) { print_status_narrow(); return false; } + #endif \ No newline at end of file diff --git a/keyboards/tweetydabird/lotus58/lotus58.c b/keyboards/tweetydabird/lotus58/lotus58.c index a06c88111cce..f1e433a4265c 100644 --- a/keyboards/tweetydabird/lotus58/lotus58.c +++ b/keyboards/tweetydabird/lotus58/lotus58.c @@ -6,7 +6,7 @@ #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - return OLED_ROTATION_90; + return OLED_ROTATION_270; } void render_logo(void) { diff --git a/keyboards/tweetydabird/lotus58/rules.mk b/keyboards/tweetydabird/lotus58/rules.mk new file mode 100644 index 000000000000..4cd2262cc775 --- /dev/null +++ b/keyboards/tweetydabird/lotus58/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = tweetydabird/lotus58/promicro \ No newline at end of file