diff options
| author | Brandon Claveria <48102030+swiftrax@users.noreply.github.com> | 2022-02-21 00:55:05 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-21 00:55:05 -0800 |
| commit | 67b9a722c0d780e80a6d68c7a6981a68897db736 (patch) | |
| tree | 1ec0eccb6f5ef625c9cb3e35eb8fd28abd64f3b7 /keyboards | |
| parent | 18490537a5a2c050ecfa1ee2209229eba6b8b342 (diff) | |
| download | qmk_firmware-67b9a722c0d780e80a6d68c7a6981a68897db736.tar.gz qmk_firmware-67b9a722c0d780e80a6d68c7a6981a68897db736.zip | |
[Keyboard] Add Ellora65 (#14754)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: swiftrax <swiftrax@github.com>
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/kikoslab/ellora65/config.h | 55 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/ellora65.c | 17 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/ellora65.h | 40 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/info.json | 10 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/keymaps/default/keymap.c | 240 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/keymaps/default/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/keymaps/via/keymap.c | 249 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/keymaps/via/rules.mk | 3 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/readme.md | 21 | ||||
| -rw-r--r-- | keyboards/kikoslab/ellora65/rules.mk | 19 |
10 files changed, 656 insertions, 0 deletions
diff --git a/keyboards/kikoslab/ellora65/config.h b/keyboards/kikoslab/ellora65/config.h new file mode 100644 index 000000000..e3f7452f4 --- /dev/null +++ b/keyboards/kikoslab/ellora65/config.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Swiftrax <swiftrax@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x04D8 | ||
| 24 | #define PRODUCT_ID 0xE88F | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Kikos Lab | ||
| 27 | #define PRODUCT Ellora65 | ||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 10 | ||
| 30 | #define MATRIX_COLS 8 | ||
| 31 | |||
| 32 | // ROWS: Top to bottom, COLS: Left to right | ||
| 33 | |||
| 34 | #define MATRIX_ROW_PINS { B7, B2, F1, F4, D6, D7, D5, D4, D3, D2 } | ||
| 35 | #define MATRIX_COL_PINS { F5, F6, F7, C6, B6, B5, B4, B3 } | ||
| 36 | |||
| 37 | /* COL2ROW or ROW2COL */ | ||
| 38 | #define DIODE_DIRECTION COL2ROW | ||
| 39 | |||
| 40 | #define ENCODERS_PAD_A { B0 } | ||
| 41 | #define ENCODERS_PAD_B { B1 } | ||
| 42 | |||
| 43 | /* define if matrix has ghost */ | ||
| 44 | //#define MATRIX_HAS_GHOST | ||
| 45 | |||
| 46 | /* Set 0 if debouncing isn't needed */ | ||
| 47 | #define DEBOUNCE 5 | ||
| 48 | |||
| 49 | /*RGB TINGS*/ | ||
| 50 | #define RGB_DI_PIN E6 | ||
| 51 | #define RGBLED_NUM 12 | ||
| 52 | |||
| 53 | /* bootmagic row col assignment */ | ||
| 54 | #define BOOTMAGIC_LITE_ROW 1 | ||
| 55 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/kikoslab/ellora65/ellora65.c b/keyboards/kikoslab/ellora65/ellora65.c new file mode 100644 index 000000000..8ef707c2d --- /dev/null +++ b/keyboards/kikoslab/ellora65/ellora65.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Swiftrax <swiftrax@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include "ellora65.h" | ||
diff --git a/keyboards/kikoslab/ellora65/ellora65.h b/keyboards/kikoslab/ellora65/ellora65.h new file mode 100644 index 000000000..2662f5a7a --- /dev/null +++ b/keyboards/kikoslab/ellora65/ellora65.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Swiftrax <swiftrax@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define XXX KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT_all( \ | ||
| 24 | K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107,\ | ||
| 25 | K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207 ,\ | ||
| 26 | K400, K500, K401, K501, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507,\ | ||
| 27 | K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K707,\ | ||
| 28 | K800, K900, K801, K901, K802, K803, K804, K905, K806, K906, K807, K907 \ | ||
| 29 | ){ \ | ||
| 30 | {K000, K001, K002, K003, K004, K005, K006, K007},\ | ||
| 31 | {K100, K101, K102, K103, K104, K105, K106, K107},\ | ||
| 32 | {K200, K201, K202, K203, K204, K205, K206, K207},\ | ||
| 33 | {K300, K301, K302, K303, K304, K305, K306, XXX},\ | ||
| 34 | {K400, K401, K402, K403, K404, K405, K406, K407},\ | ||
| 35 | {K500, K501, K502, K503, K504, K505, K506, K507},\ | ||
| 36 | {K600, K601, K602, K603, K604, K605, K606, K607},\ | ||
| 37 | {K700, K701, K702, K703, K704, K705, K706, K707},\ | ||
| 38 | {K800, K801, K802, K803, K804, XXX, K806, K807},\ | ||
| 39 | {K900, K901, XXX, XXX, XXX, K905, K906, K907} \ | ||
| 40 | } | ||
diff --git a/keyboards/kikoslab/ellora65/info.json b/keyboards/kikoslab/ellora65/info.json new file mode 100644 index 000000000..64c3f7eaa --- /dev/null +++ b/keyboards/kikoslab/ellora65/info.json | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Ellora65", | ||
| 3 | "url": "https://github.com/swiftrax", | ||
| 4 | "maintainer": "swiftrax", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_all": { | ||
| 7 | "layout": [{"label":"0,0", "x":1.25, "y":0}, {"label":"1,0", "x":2.5, "y":0.25}, {"label":"0,1", "x":3.5, "y":0.25}, {"label":"1,1", "x":4.5, "y":0.25}, {"label":"0,2", "x":5.5, "y":0.25}, {"label":"1,2", "x":6.5, "y":0.25}, {"label":"0,3", "x":7.5, "y":0.25}, {"label":"1,3", "x":8.5, "y":0.25}, {"label":"0,4", "x":9.5, "y":0.25}, {"label":"1,4", "x":10.5, "y":0.25}, {"label":"0,5", "x":11.5, "y":0.25}, {"label":"1,5", "x":12.5, "y":0.25}, {"label":"0,6", "x":13.5, "y":0.25}, {"label":"1,6", "x":14.5, "y":0.25}, {"label":"0,7", "x":15.5, "y":0.25}, {"label":"1,7", "x":16.5, "y":0.25}, {"label":"2,0", "x":1.25, "y":1.25}, {"label":"3,0", "x":2.5, "y":1.25, "w":1.5}, {"label":"2,1", "x":4, "y":1.25}, {"label":"3,1", "x":5, "y":1.25}, {"label":"2,2", "x":6, "y":1.25}, {"label":"3,2", "x":7, "y":1.25}, {"label":"2,3", "x":8, "y":1.25}, {"label":"3,3", "x":9, "y":1.25}, {"label":"2,4", "x":10, "y":1.25}, {"label":"3,4", "x":11, "y":1.25}, {"label":"2,5", "x":12, "y":1.25}, {"label":"3,5", "x":13, "y":1.25}, {"label":"2,6", "x":14, "y":1.25}, {"label":"3,6", "x":15, "y":1.25}, {"label":"2,7", "x":16, "y":1.25, "w":1.5}, {"label":"4,0", "x":1.25, "y":2.25}, {"label":"5,0", "x":2.5, "y":2.25, "w":1.75}, {"label":"4,1", "x":4.25, "y":2.25}, {"label":"5,1", "x":5.25, "y":2.25}, {"label":"4,2", "x":6.25, "y":2.25}, {"label":"5,2", "x":7.25, "y":2.25}, {"label":"4,3", "x":8.25, "y":2.25}, {"label":"5,3", "x":9.25, "y":2.25}, {"label":"4,4", "x":10.25, "y":2.25}, {"label":"5,4", "x":11.25, "y":2.25}, {"label":"4,5", "x":12.25, "y":2.25}, {"label":"5,5", "x":13.25, "y":2.25}, {"label":"4,6", "x":14.25, "y":2.25}, {"label":"5,6", "x":15.25, "y":2.25}, {"label":"4,7", "x":16.25, "y":2.25, "w":1.25}, {"label":"5,7", "x":17.5, "y":2.25}, {"label":"6,0", "x":1.25, "y":3.25}, {"label":"7,0", "x":2.5, "y":3.25, "w":1.25}, {"label":"6,1", "x":3.75, "y":3.25}, {"label":"7,1", "x":4.75, "y":3.25}, {"label":"6,2", "x":5.75, "y":3.25}, {"label":"7,2", "x":6.75, "y":3.25}, {"label":"6,3", "x":7.75, "y":3.25}, {"label":"7,3", "x":8.75, "y":3.25}, {"label":"6,4", "x":9.75, "y":3.25}, {"label":"7,4", "x":10.75, "y":3.25}, {"label":"6,5", "x":11.75, "y":3.25}, {"label":"7,5", "x":12.75, "y":3.25}, {"label":"6,6", "x":13.75, "y":3.25}, {"label":"7,6", "x":14.75, "y":3.25, "w":1.75}, {"label":"6,7", "x":16.5, "y":3.25}, {"label":"7,7", "x":17.5, "y":3.25}, {"label":"8,0", "x":1.25, "y":4.25}, {"label":"9,0", "x":2.5, "y":4.25, "w":1.25}, {"label":"8,1", "x":3.75, "y":4.25, "w":1.25}, {"label":"9,1", "x":5, "y":4.25, "w":1.25}, {"label":"8,2", "x":6.25, "y":4.25, "w":2.75}, {"label":"8,3", "x":9, "y":4.25, "w":1.25}, {"label":"8,4", "x":10.25, "y":4.25, "w":2.25}, {"label":"9,5", "x":12.5, "y":4.25}, {"label":"8,6", "x":13.5, "y":4.25, "w":1.5}, {"label":"9,6", "x":15.5, "y":4.25}, {"label":"8,7", "x":16.5, "y":4.25}, {"label":"9,7", "x":17.5, "y":4.25}] | ||
| 8 | } | ||
| 9 | } | ||
| 10 | } \ No newline at end of file | ||
diff --git a/keyboards/kikoslab/ellora65/keymaps/default/keymap.c b/keyboards/kikoslab/ellora65/keymaps/default/keymap.c new file mode 100644 index 000000000..bf18fe87d --- /dev/null +++ b/keyboards/kikoslab/ellora65/keymaps/default/keymap.c | |||
| @@ -0,0 +1,240 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Kiko <kikosdesignlab@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | enum _layer { | ||
| 20 | _MA, | ||
| 21 | _FN | ||
| 22 | }; | ||
| 23 | |||
| 24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 25 | |||
| 26 | [_MA] = LAYOUT_all( | ||
| 27 | KC_MUTE, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, | ||
| 28 | KC_F13 , 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_RBRC, KC_BSLS, | ||
| 29 | KC_F14 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_INS, | ||
| 30 | KC_F15 , KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_DEL, | ||
| 31 | KC_F16 , KC_LCTL, KC_LGUI, KC_LALT, MO(_FN) , KC_SPC , MO(_FN) , MO(_FN), MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 32 | |||
| 33 | [_FN] = LAYOUT_all( | ||
| 34 | KC_DEL , KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_BSPC, KC_TRNS, | ||
| 35 | KC_F17 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 36 | KC_F18 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 37 | KC_F19 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 38 | KC_F20 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | ||
| 39 | }; | ||
| 40 | |||
| 41 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 42 | if (clockwise) { | ||
| 43 | tap_code(KC_VOLU); | ||
| 44 | } else { | ||
| 45 | tap_code(KC_VOLD); | ||
| 46 | } | ||
| 47 | |||
| 48 | return false; | ||
| 49 | } | ||
| 50 | |||
| 51 | #ifdef OLED_ENABLE | ||
| 52 | |||
| 53 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 54 | return OLED_ROTATION_90; | ||
| 55 | } | ||
| 56 | |||
| 57 | /* KEYBOARD PET START */ | ||
| 58 | |||
| 59 | /* settings */ | ||
| 60 | #define MIN_WALK_SPEED 10 | ||
| 61 | #define MIN_RUN_SPEED 40 | ||
| 62 | |||
| 63 | /* advanced settings */ | ||
| 64 | #define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms | ||
| 65 | #define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 | ||
| 66 | |||
| 67 | /* timers */ | ||
| 68 | uint32_t anim_timer = 0; | ||
| 69 | uint32_t anim_sleep = 0; | ||
| 70 | |||
| 71 | /* current frame */ | ||
| 72 | uint8_t current_frame = 0; | ||
| 73 | |||
| 74 | /* status variables */ | ||
| 75 | int current_wpm = 0; | ||
| 76 | led_t led_usb_state; | ||
| 77 | |||
| 78 | bool isSneaking = false; | ||
| 79 | bool isJumping = false; | ||
| 80 | bool showedJump = true; | ||
| 81 | |||
| 82 | /* logic */ | ||
| 83 | static void render_luna(int LUNA_X, int LUNA_Y) { | ||
| 84 | /* Sit */ | ||
| 85 | static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ | ||
| 86 | { | ||
| 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 88 | }, | ||
| 89 | |||
| 90 | /* 'sit2', 32x22px */ | ||
| 91 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; | ||
| 92 | |||
| 93 | /* Walk */ | ||
| 94 | static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ | ||
| 95 | { | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 97 | }, | ||
| 98 | |||
| 99 | /* 'walk2', 32x22px */ | ||
| 100 | { | ||
| 101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 102 | }}; | ||
| 103 | |||
| 104 | /* Run */ | ||
| 105 | static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ | ||
| 106 | { | ||
| 107 | 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 108 | }, | ||
| 109 | |||
| 110 | /* 'run2', 32x22px */ | ||
| 111 | { | ||
| 112 | 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 113 | }}; | ||
| 114 | |||
| 115 | /* Bark */ | ||
| 116 | static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ | ||
| 117 | { | ||
| 118 | 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 119 | }, | ||
| 120 | |||
| 121 | /* 'bark2', 32x22px */ | ||
| 122 | { | ||
| 123 | 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 124 | }}; | ||
| 125 | |||
| 126 | /* Sneak */ | ||
| 127 | static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ | ||
| 128 | { | ||
| 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, | ||
| 130 | }, | ||
| 131 | |||
| 132 | /* 'sneak2', 32x22px */ | ||
| 133 | { | ||
| 134 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 135 | }}; | ||
| 136 | |||
| 137 | /* animation */ | ||
| 138 | void animate_luna(void) { | ||
| 139 | /* jump */ | ||
| 140 | if (isJumping || !showedJump) { | ||
| 141 | /* clear */ | ||
| 142 | oled_set_cursor(LUNA_X, LUNA_Y + 2); | ||
| 143 | oled_write(" ", false); | ||
| 144 | |||
| 145 | oled_set_cursor(LUNA_X, LUNA_Y - 1); | ||
| 146 | |||
| 147 | showedJump = true; | ||
| 148 | } else { | ||
| 149 | /* clear */ | ||
| 150 | oled_set_cursor(LUNA_X, LUNA_Y - 1); | ||
| 151 | oled_write(" ", false); | ||
| 152 | |||
| 153 | oled_set_cursor(LUNA_X, LUNA_Y); | ||
| 154 | } | ||
| 155 | |||
| 156 | /* switch frame */ | ||
| 157 | current_frame = (current_frame + 1) % 2; | ||
| 158 | |||
| 159 | /* current status */ | ||
| 160 | if (led_usb_state.caps_lock) { | ||
| 161 | oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); | ||
| 162 | |||
| 163 | } else if (isSneaking) { | ||
| 164 | oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); | ||
| 165 | |||
| 166 | } else if (current_wpm <= MIN_WALK_SPEED) { | ||
| 167 | oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); | ||
| 168 | |||
| 169 | } else if (current_wpm <= MIN_RUN_SPEED) { | ||
| 170 | oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); | ||
| 171 | |||
| 172 | } else { | ||
| 173 | oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); | ||
| 174 | } | ||
| 175 | } | ||
| 176 | |||
| 177 | /* animation timer */ | ||
| 178 | if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { | ||
| 179 | anim_timer = timer_read32(); | ||
| 180 | animate_luna(); | ||
| 181 | } | ||
| 182 | |||
| 183 | /* this fixes the screen on and off bug */ | ||
| 184 | if (current_wpm > 0) { | ||
| 185 | oled_on(); | ||
| 186 | anim_sleep = timer_read32(); | ||
| 187 | } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { | ||
| 188 | oled_off(); | ||
| 189 | } | ||
| 190 | } | ||
| 191 | |||
| 192 | |||
| 193 | /* KEYBOARD PET END */ | ||
| 194 | |||
| 195 | static void print_status_narrow(void) { | ||
| 196 | render_luna(0, 13); | ||
| 197 | } | ||
| 198 | |||
| 199 | |||
| 200 | void oled_task_user(void) { | ||
| 201 | /* KEYBOARD PET VARIABLES START */ | ||
| 202 | |||
| 203 | current_wpm = get_current_wpm(); | ||
| 204 | led_usb_state = host_keyboard_led_state(); | ||
| 205 | |||
| 206 | /* KEYBOARD PET VARIABLES END */ | ||
| 207 | |||
| 208 | print_status_narrow(); | ||
| 209 | |||
| 210 | } | ||
| 211 | |||
| 212 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 213 | switch (keycode) { | ||
| 214 | |||
| 215 | /* KEYBOARD PET STATUS START */ | ||
| 216 | |||
| 217 | case KC_LCTL: | ||
| 218 | case KC_RCTL: | ||
| 219 | if (record->event.pressed) { | ||
| 220 | isSneaking = true; | ||
| 221 | } else { | ||
| 222 | isSneaking = false; | ||
| 223 | } | ||
| 224 | break; | ||
| 225 | case KC_SPC: | ||
| 226 | if (record->event.pressed) { | ||
| 227 | isJumping = true; | ||
| 228 | showedJump = false; | ||
| 229 | } else { | ||
| 230 | isJumping = false; | ||
| 231 | } | ||
| 232 | break; | ||
| 233 | |||
| 234 | /* KEYBOARD PET STATUS END */ | ||
| 235 | } | ||
| 236 | return true; | ||
| 237 | |||
| 238 | } | ||
| 239 | |||
| 240 | #endif \ No newline at end of file | ||
diff --git a/keyboards/kikoslab/ellora65/keymaps/default/rules.mk b/keyboards/kikoslab/ellora65/keymaps/default/rules.mk new file mode 100644 index 000000000..bbe99c423 --- /dev/null +++ b/keyboards/kikoslab/ellora65/keymaps/default/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | OLED_ENABLE = yes | ||
| 2 | WPM_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/kikoslab/ellora65/keymaps/via/keymap.c b/keyboards/kikoslab/ellora65/keymaps/via/keymap.c new file mode 100644 index 000000000..707abaf6b --- /dev/null +++ b/keyboards/kikoslab/ellora65/keymaps/via/keymap.c | |||
| @@ -0,0 +1,249 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Kiko <kikosdesignlab@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [0] = LAYOUT_all( | ||
| 22 | KC_MUTE, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, | ||
| 23 | KC_F13 , 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_RBRC, KC_BSLS, | ||
| 24 | KC_F14 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_INS, | ||
| 25 | KC_F15 , KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_DEL, | ||
| 26 | KC_F16 , KC_LCTL, KC_LGUI, KC_LALT, MO(1) , KC_SPC , MO(1) , MO(1) , MO(1) , KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 27 | |||
| 28 | [1] = LAYOUT_all( | ||
| 29 | KC_DEL , KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_BSPC, KC_TRNS, | ||
| 30 | KC_F17 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_F18 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_F19 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_F20 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 34 | |||
| 35 | [2] = LAYOUT_all( | ||
| 36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, | ||
| 37 | KC_F17 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 38 | KC_F18 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 39 | KC_F19 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 40 | KC_F20 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 41 | |||
| 42 | [3] = LAYOUT_all( | ||
| 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, | ||
| 44 | KC_F17 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_F18 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 46 | KC_F19 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 47 | KC_F20 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | ||
| 48 | }; | ||
| 49 | |||
| 50 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 51 | if (clockwise) { | ||
| 52 | tap_code(KC_VOLU); | ||
| 53 | } else { | ||
| 54 | tap_code(KC_VOLD); | ||
| 55 | } | ||
| 56 | |||
| 57 | return false; | ||
| 58 | } | ||
| 59 | |||
| 60 | #ifdef OLED_ENABLE | ||
| 61 | |||
| 62 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 63 | return OLED_ROTATION_90; | ||
| 64 | } | ||
| 65 | |||
| 66 | /* KEYBOARD PET START */ | ||
| 67 | |||
| 68 | /* settings */ | ||
| 69 | #define MIN_WALK_SPEED 10 | ||
| 70 | #define MIN_RUN_SPEED 40 | ||
| 71 | |||
| 72 | /* advanced settings */ | ||
| 73 | #define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms | ||
| 74 | #define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 | ||
| 75 | |||
| 76 | /* timers */ | ||
| 77 | uint32_t anim_timer = 0; | ||
| 78 | uint32_t anim_sleep = 0; | ||
| 79 | |||
| 80 | /* current frame */ | ||
| 81 | uint8_t current_frame = 0; | ||
| 82 | |||
| 83 | /* status variables */ | ||
| 84 | int current_wpm = 0; | ||
| 85 | led_t led_usb_state; | ||
| 86 | |||
| 87 | bool isSneaking = false; | ||
| 88 | bool isJumping = false; | ||
| 89 | bool showedJump = true; | ||
| 90 | |||
| 91 | /* logic */ | ||
| 92 | static void render_luna(int LUNA_X, int LUNA_Y) { | ||
| 93 | /* Sit */ | ||
| 94 | static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ | ||
| 95 | { | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 97 | }, | ||
| 98 | |||
| 99 | /* 'sit2', 32x22px */ | ||
| 100 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; | ||
| 101 | |||
| 102 | /* Walk */ | ||
| 103 | static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ | ||
| 104 | { | ||
| 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 106 | }, | ||
| 107 | |||
| 108 | /* 'walk2', 32x22px */ | ||
| 109 | { | ||
| 110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 111 | }}; | ||
| 112 | |||
| 113 | /* Run */ | ||
| 114 | static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ | ||
| 115 | { | ||
| 116 | 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 117 | }, | ||
| 118 | |||
| 119 | /* 'run2', 32x22px */ | ||
| 120 | { | ||
| 121 | 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 122 | }}; | ||
| 123 | |||
| 124 | /* Bark */ | ||
| 125 | static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ | ||
| 126 | { | ||
| 127 | 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 128 | }, | ||
| 129 | |||
| 130 | /* 'bark2', 32x22px */ | ||
| 131 | { | ||
| 132 | 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 133 | }}; | ||
| 134 | |||
| 135 | /* Sneak */ | ||
| 136 | static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ | ||
| 137 | { | ||
| 138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, | ||
| 139 | }, | ||
| 140 | |||
| 141 | /* 'sneak2', 32x22px */ | ||
| 142 | { | ||
| 143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 144 | }}; | ||
| 145 | |||
| 146 | /* animation */ | ||
| 147 | void animate_luna(void) { | ||
| 148 | /* jump */ | ||
| 149 | if (isJumping || !showedJump) { | ||
| 150 | /* clear */ | ||
| 151 | oled_set_cursor(LUNA_X, LUNA_Y + 2); | ||
| 152 | oled_write(" ", false); | ||
| 153 | |||
| 154 | oled_set_cursor(LUNA_X, LUNA_Y - 1); | ||
| 155 | |||
| 156 | showedJump = true; | ||
| 157 | } else { | ||
| 158 | /* clear */ | ||
| 159 | oled_set_cursor(LUNA_X, LUNA_Y - 1); | ||
| 160 | oled_write(" ", false); | ||
| 161 | |||
| 162 | oled_set_cursor(LUNA_X, LUNA_Y); | ||
| 163 | } | ||
| 164 | |||
| 165 | /* switch frame */ | ||
| 166 | current_frame = (current_frame + 1) % 2; | ||
| 167 | |||
| 168 | /* current status */ | ||
| 169 | if (led_usb_state.caps_lock) { | ||
| 170 | oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); | ||
| 171 | |||
| 172 | } else if (isSneaking) { | ||
| 173 | oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); | ||
| 174 | |||
| 175 | } else if (current_wpm <= MIN_WALK_SPEED) { | ||
| 176 | oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); | ||
| 177 | |||
| 178 | } else if (current_wpm <= MIN_RUN_SPEED) { | ||
| 179 | oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); | ||
| 180 | |||
| 181 | } else { | ||
| 182 | oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | /* animation timer */ | ||
| 187 | if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { | ||
| 188 | anim_timer = timer_read32(); | ||
| 189 | animate_luna(); | ||
| 190 | } | ||
| 191 | |||
| 192 | /* this fixes the screen on and off bug */ | ||
| 193 | if (current_wpm > 0) { | ||
| 194 | oled_on(); | ||
| 195 | anim_sleep = timer_read32(); | ||
| 196 | } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { | ||
| 197 | oled_off(); | ||
| 198 | } | ||
| 199 | } | ||
| 200 | |||
| 201 | |||
| 202 | /* KEYBOARD PET END */ | ||
| 203 | |||
| 204 | static void print_status_narrow(void) { | ||
| 205 | render_luna(0, 13); | ||
| 206 | } | ||
| 207 | |||
| 208 | |||
| 209 | void oled_task_user(void) { | ||
| 210 | /* KEYBOARD PET VARIABLES START */ | ||
| 211 | |||
| 212 | current_wpm = get_current_wpm(); | ||
| 213 | led_usb_state = host_keyboard_led_state(); | ||
| 214 | |||
| 215 | /* KEYBOARD PET VARIABLES END */ | ||
| 216 | |||
| 217 | print_status_narrow(); | ||
| 218 | |||
| 219 | } | ||
| 220 | |||
| 221 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 222 | switch (keycode) { | ||
| 223 | |||
| 224 | /* KEYBOARD PET STATUS START */ | ||
| 225 | |||
| 226 | case KC_LCTL: | ||
| 227 | case KC_RCTL: | ||
| 228 | if (record->event.pressed) { | ||
| 229 | isSneaking = true; | ||
| 230 | } else { | ||
| 231 | isSneaking = false; | ||
| 232 | } | ||
| 233 | break; | ||
| 234 | case KC_SPC: | ||
| 235 | if (record->event.pressed) { | ||
| 236 | isJumping = true; | ||
| 237 | showedJump = false; | ||
| 238 | } else { | ||
| 239 | isJumping = false; | ||
| 240 | } | ||
| 241 | break; | ||
| 242 | |||
| 243 | /* KEYBOARD PET STATUS END */ | ||
| 244 | } | ||
| 245 | return true; | ||
| 246 | |||
| 247 | } | ||
| 248 | |||
| 249 | #endif \ No newline at end of file | ||
diff --git a/keyboards/kikoslab/ellora65/keymaps/via/rules.mk b/keyboards/kikoslab/ellora65/keymaps/via/rules.mk new file mode 100644 index 000000000..fe4a69869 --- /dev/null +++ b/keyboards/kikoslab/ellora65/keymaps/via/rules.mk | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | OLED_ENABLE = yes | ||
| 3 | WPM_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/kikoslab/ellora65/readme.md b/keyboards/kikoslab/ellora65/readme.md new file mode 100644 index 000000000..419c5418e --- /dev/null +++ b/keyboards/kikoslab/ellora65/readme.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Ellora65 | ||
| 2 | |||
| 3 | 65% With Macro Column, Encoder, and OLED | ||
| 4 | |||
| 5 | * Keyboard Maintainer: Kiko | ||
| 6 | * Hardware Supported: KL-65 PCB | ||
| 7 | * Hardware Availability: https://www.kikoslab.com | ||
| 8 | |||
| 9 | ## Bootloader | ||
| 10 | |||
| 11 | Enter the bootloader in 3 ways: | ||
| 12 | |||
| 13 | * **Bootmagic reset**: Hold down the key at (1,0) in the matrix (escape key) and plug in the keyboard | ||
| 14 | * **Physical reset button**: Briefly press the button on the back of the PCB | ||
| 15 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
| 16 | |||
| 17 | Make example for this keyboard (after setting up your build environment): | ||
| 18 | |||
| 19 | make kikoslab/ellora65:default | ||
| 20 | |||
| 21 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/kikoslab/ellora65/rules.mk b/keyboards/kikoslab/ellora65/rules.mk new file mode 100644 index 000000000..7fe30a833 --- /dev/null +++ b/keyboards/kikoslab/ellora65/rules.mk | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | ENCODER_ENABLE = yes \ No newline at end of file | ||
