From f760759fe498a948579bbea258a8b2b9ec89fb0c Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Fri, 19 May 2023 16:31:35 +0700 Subject: [PATCH 01/46] vinh: test fw for uncertainty (deprecated) --- keyboards/uncertainty/chconf.h.old | 25 + keyboards/uncertainty/config.h | 69 + keyboards/uncertainty/halconf.h | 13 + keyboards/uncertainty/info.json | 163 ++ .../uncertainty/keymaps/default/keymap.c | 174 ++ .../uncertainty/keymaps/default/keymap.json | 8 + .../uncertainty/keymaps/default/rules.mk | 1 + keyboards/uncertainty/keymaps/test/keymap.c | 588 ++++++ keyboards/uncertainty/keymaps/test/rules.mk | 1 + keyboards/uncertainty/kipythonlog | 1667 +++++++++++++++++ keyboards/uncertainty/mcuconf.h | 10 + keyboards/uncertainty/placefp.py | 55 + keyboards/uncertainty/readme.md | 27 + keyboards/uncertainty/rules.mk | 10 + keyboards/uncertainty/test/config.h | 71 + keyboards/uncertainty/test/halconf.h | 13 + keyboards/uncertainty/test/info.json | 163 ++ keyboards/uncertainty/test/mcuconf.h | 10 + keyboards/uncertainty/test/rules.mk | 13 + 19 files changed, 3081 insertions(+) create mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/config.h create mode 100644 keyboards/uncertainty/halconf.h create mode 100644 keyboards/uncertainty/info.json create mode 100644 keyboards/uncertainty/keymaps/default/keymap.c create mode 100644 keyboards/uncertainty/keymaps/default/keymap.json create mode 100644 keyboards/uncertainty/keymaps/default/rules.mk create mode 100644 keyboards/uncertainty/keymaps/test/keymap.c create mode 100644 keyboards/uncertainty/keymaps/test/rules.mk create mode 100644 keyboards/uncertainty/kipythonlog create mode 100644 keyboards/uncertainty/mcuconf.h create mode 100644 keyboards/uncertainty/placefp.py create mode 100644 keyboards/uncertainty/readme.md create mode 100644 keyboards/uncertainty/rules.mk create mode 100644 keyboards/uncertainty/test/config.h create mode 100644 keyboards/uncertainty/test/halconf.h create mode 100644 keyboards/uncertainty/test/info.json create mode 100644 keyboards/uncertainty/test/mcuconf.h create mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old new file mode 100644 index 000000000000..a6e216133f50 --- /dev/null +++ b/keyboards/uncertainty/chconf.h.old @@ -0,0 +1,25 @@ +#pragma once +// #include_next + +#undef CH_CFG_ST_FREQUENCY +#define CH_CFG_ST_FREQUENCY 10000 + +#undef CH_CFG_FACTORY_OBJECTS_REGISTRY +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#undef CH_CFG_FACTORY_GENERIC_BUFFERS +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#undef CH_CFG_FACTORY_SEMAPHORES +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#undef CH_CFG_FACTORY_MAILBOXES +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#undef CH_CFG_FACTORY_OBJ_FIFOS +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#undef CH_CFG_FACTORY_PIPES +#define CH_CFG_FACTORY_PIPES TRUE +#include_next + diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h new file mode 100644 index 000000000000..9eb0322b7adc --- /dev/null +++ b/keyboards/uncertainty/config.h @@ -0,0 +1,69 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B8 + #define WS2812_PWM_DRIVER PWMD3 // TIM4 + #define WS2812_PWM_CHANNEL 4 // CH3 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + + diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json new file mode 100644 index 000000000000..7e982dcb20c8 --- /dev/null +++ b/keyboards/uncertainty/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 8, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b2b513402f3 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -0,0 +1,174 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 6); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE +// typedef enum { +// OLED_ROTATION_0 = 0, +// OLED_ROTATION_90 = 1, +// OLED_ROTATION_180 = 2, +// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +// } oled_rotation_t; +// oled_rotation_t oled_init_user(oled_rotation_t rotation) { +// return OLED_ROTATION_90; +// } +// bool oled_task_user(void) { +// oled_write_P(PSTR("WPM: "), false); +// oled_write(get_u8_str(get_current_wpm(), '0'), false); +// return false; +// } +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +bool oled_task_user(void) { + //render_logo(); + //oled_set_cursor(1, 1); + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + return false; +} +#endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json new file mode 100644 index 000000000000..127a66c02f3f --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.json @@ -0,0 +1,8 @@ +{ + "keyboard": "uncertainty", + "keymap": "default", + "layers": [ + ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] + ], + "layout": "LAYOUT" +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk new file mode 100644 index 000000000000..3086a27b34f2 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -0,0 +1 @@ +//ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c new file mode 100644 index 000000000000..b4ba6ecd2f2c --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/keymap.c @@ -0,0 +1,588 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +/* Encoder mapping */ +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } +}; +#endif + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; +/* end Keymap */ + +/* OLED test */ +enum tap_dances { + TD_OLED, +}; +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +bool oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return false; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } + return false; +} +/* -------------------------------------------------------------------*/ +/* end OLED test */ + +user_config_t user_config; + +/* RGB Test */ +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +/* end RGB Test */ + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + + // // Enable the LED layers + // rgblight_layers = my_rgb_layers; + // rgblight_set_layer_state(0, 1); + // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + // rgblight_set_effect_range(2, 6); + + // rgblight_enable(); + // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/uncertainty/kipythonlog new file mode 100644 index 000000000000..7883889b77ec --- /dev/null +++ b/keyboards/uncertainty/kipythonlog @@ -0,0 +1,1667 @@ +Py 0.9.8 +Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py + +import pcbnew +pcbnew.GetBoard() + > +myboard = pcbnew.GetBoard() +for fp in myboard.GetFootprints(): + print(fp.GetReference()) + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +footprints = myboard.GetFootprints() +printf(footprints[0]) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'printf' is not defined +print(footprints[0]) +::value_type' at 0x00000218643C36F0> > +print(footprints[0].GetReference()) +D88 +print(footprints[0].fp_id) +Traceback (most recent call last): + File "", line 1, in +AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' +selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] +print(selected) +['D15'] +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) +... + File "", line 5 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + fi +... + File "", line 6 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + + +Traceback (most recent call last): + File "", line 2, in +AttributeError: 'FOOTPRINT' object has no attribute 'ref' +for fp in footprints: + try: + sheet_file = fp.GetProperty('Sheetfile') + # construct a list of all the footprints + mod_named_tuple = Footprint(fp=fp, + fp_id=self.get_footprint_id(fp), + sheet_id=self.get_sheet_path(fp)[0], + filename=self.get_sheet_path(fp)[1], + ref=fp.GetReference()) + self.footprints.append(mod_named_tuple) + except KeyError: + pass + pass + File "", line 13 + pass + ^ +IndentationError: unindent does not match any outer indentation level +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + File "", line 1 + fp_list = [] + ^ +SyntaxError: multiple statements found while compiling a single statement +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass +pass + File "", line 7 + pass + ^ +SyntaxError: invalid syntax +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass + + +Traceback (most recent call last): + File "", line 3, in +NameError: name 'Footprint' is not defined +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'fp_id' is not defined +fp_id = "" +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +print(selected) +['D15'] +selected +['D15'] +selected[0] +'D15' +for fp in footprints: + if fp.GetReference() == selected[0]: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D15 +print(fp_id) +D51D642D-4C52-4D3C-BA63-D62449DDB306 +def get_fp_id(fp): + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + else: + fp_id = None + return fp_id + + +for fp in footprints: + if get_fp_id(fp) == fp_id: + print(fp.GetReference()) + + + +D15 +def get_fp_diode(footprints): + diode_list = [] + + + +diode_list = [] +for fp in footprints: + ref = fp.GetReference() + if ref[0] == 'D': + diode_list.append(fp) + + +print(diode_list) +[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort + +diode_list.sort() +for fp in diode_list print(fp.GetReference()) + File "", line 1 + for fp in diode_list print(fp.GetReference()) + ^ +SyntaxError: invalid syntax +for fp in diode_list: print(fp.GetReference()) + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort() +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +def sortByRef(e): + return e.GetReference() + + +diode_list.sort(key=sortByRef) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D10 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D11 +D110 +D111 +D112 +D113 +D114 +D115 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D2 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D3 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D4 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D5 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D6 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D7 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D8 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D9 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +def sortByRefNew(e): + ref = e.GetReference() + return int(ref[1:]) + + +diode_list.sort(key=sortByRefNew) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D110 +D111 +D112 +D113 +D114 +D115 +def fp_set_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.SetBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.SetBrightened() + + + + +for i in range(diode_list): + fp_set_highlight(diode_list[i]) + i = i + 17 + + +Traceback (most recent call last): + File "", line 1, in +TypeError: 'list' object cannot be interpreted as an integer +for col in range(0,105): + fp_set_highlight(diode_list[col]) + col = col + 17 + + +pcbnew.Refresh() +for col in range(0,105): + print(diode_list[col].GetReference()) + col = col + 17 + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +for i in range(0,105,17): + print(diode_list[i].GetReference()) + + +D1 +D18 +D35 +D52 +D69 +D86 +D103 +for i in range(0,105,18): + print(diode_list[i].GetReference()) + . + + File "", line 3 + . + ^ +SyntaxError: invalid syntax +for i in range(0,105,18): + print(diode_list[i].GetReference()) + + +D1 +D19 +D37 +D55 +D73 +D91 +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def fp_clear_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.ClearBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.ClearBrightened() + +for fp in diode_list: + fp_clear_highlight(fp) + +pcbnew.Refresh() +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +fp_to_place = [] +for i in range(0,105,18): + fp_to_place.append(diode_list[i]) + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in +TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'list' object has no attribute 'GetPosition' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 17, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 20, in place_linear +NameError: name 'SCALE' is not defined +SCALE = 1000000.0 +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 24, in place_linear +ZeroDivisionError: integer division or modulo by zero +place_linear(fp_to_place, 3, 0, 1, 0) +pcbnew.Refresh() diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/uncertainty/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/placefp.py b/keyboards/uncertainty/placefp.py new file mode 100644 index 000000000000..dc5954624e4c --- /dev/null +++ b/keyboards/uncertainty/placefp.py @@ -0,0 +1,55 @@ +import pcbnew + +SCALE = 1000000.0 +board = pcbnew.GetBoard() + +def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + #ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = -1 #footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): + #row = len(footprints_to_place) / col + + #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] + #first row + place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) + for i in range(col): + place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) + pcbnew.Refresh() + +def get_selected(): + #get list of selected fp + selected = [x for x in board.GetFootprints() if x.IsSelected()] + return selected + #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) +def sort_by_ref(fpList, reversed=False): + str = fpList[0].GetReference() + for i, char in enumerate(str): + # Checking if char is numeric + if char.isdigit(): + index = i + break + fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) + return fpList diff --git a/keyboards/uncertainty/readme.md b/keyboards/uncertainty/readme.md new file mode 100644 index 000000000000..cd3c36958e06 --- /dev/null +++ b/keyboards/uncertainty/readme.md @@ -0,0 +1,27 @@ +# uncertainty + +![uncertainty](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make uncertainty:default + +Flashing example for this keyboard: + + make uncertainty:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/uncertainty/rules.mk b/keyboards/uncertainty/rules.mk new file mode 100644 index 000000000000..6b7648feb02f --- /dev/null +++ b/keyboards/uncertainty/rules.mk @@ -0,0 +1,10 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h new file mode 100644 index 000000000000..ade817c14d78 --- /dev/null +++ b/keyboards/uncertainty/test/config.h @@ -0,0 +1,71 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B1 + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + +/* encoder config */ +// #define ENCODERS_PAD_A { B12 } +// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/test/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json new file mode 100644 index 000000000000..50695e5af536 --- /dev/null +++ b/keyboards/uncertainty/test/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 14, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/test/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk new file mode 100644 index 000000000000..cbaaf52ddd1a --- /dev/null +++ b/keyboards/uncertainty/test/rules.mk @@ -0,0 +1,13 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled + +# using rotary encoder +# ENCODER_ENABLE = yes From 71fe607a2b8c66807ac67edc955df1f69ec17b7b Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 01:55:05 +0700 Subject: [PATCH 02/46] v0.1: update base firmware with 2 layers, use bongo cat animation for oled --- keyboards/uncertainty/chconf.h.old | 25 - keyboards/uncertainty/config.h | 17 +- keyboards/uncertainty/halconf.h | 4 +- keyboards/uncertainty/info.json | 218 +++---- keyboards/uncertainty/keymaps/default/bongo.h | 514 +++++++++++++++ .../uncertainty/keymaps/default/keymap.c | 80 ++- .../uncertainty/keymaps/default/keymap.json | 8 - .../uncertainty/keymaps/default/rules.mk | 3 +- keyboards/uncertainty/keymaps/test/keymap.c | 588 ------------------ keyboards/uncertainty/keymaps/test/rules.mk | 1 - keyboards/uncertainty/test/config.h | 71 --- keyboards/uncertainty/test/halconf.h | 13 - keyboards/uncertainty/test/info.json | 163 ----- keyboards/uncertainty/test/mcuconf.h | 10 - keyboards/uncertainty/test/rules.mk | 13 - 15 files changed, 671 insertions(+), 1057 deletions(-) delete mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/keymaps/default/bongo.h delete mode 100644 keyboards/uncertainty/keymaps/default/keymap.json delete mode 100644 keyboards/uncertainty/keymaps/test/keymap.c delete mode 100644 keyboards/uncertainty/keymaps/test/rules.mk delete mode 100644 keyboards/uncertainty/test/config.h delete mode 100644 keyboards/uncertainty/test/halconf.h delete mode 100644 keyboards/uncertainty/test/info.json delete mode 100644 keyboards/uncertainty/test/mcuconf.h delete mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old deleted file mode 100644 index a6e216133f50..000000000000 --- a/keyboards/uncertainty/chconf.h.old +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -// #include_next - -#undef CH_CFG_ST_FREQUENCY -#define CH_CFG_ST_FREQUENCY 10000 - -#undef CH_CFG_FACTORY_OBJECTS_REGISTRY -#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE - -#undef CH_CFG_FACTORY_GENERIC_BUFFERS -#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE - -#undef CH_CFG_FACTORY_SEMAPHORES -#define CH_CFG_FACTORY_SEMAPHORES TRUE - -#undef CH_CFG_FACTORY_MAILBOXES -#define CH_CFG_FACTORY_MAILBOXES TRUE - -#undef CH_CFG_FACTORY_OBJ_FIFOS -#define CH_CFG_FACTORY_OBJ_FIFOS TRUE - -#undef CH_CFG_FACTORY_PIPES -#define CH_CFG_FACTORY_PIPES TRUE -#include_next - diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h index 9eb0322b7adc..79407df65bd2 100644 --- a/keyboards/uncertainty/config.h +++ b/keyboards/uncertainty/config.h @@ -21,15 +21,16 @@ /* WS2812 driver config specifically for STM32F401 */ -// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B8 - #define WS2812_PWM_DRIVER PWMD3 // TIM4 - #define WS2812_PWM_CHANNEL 4 // CH3 + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 #define WS2812_PWM_PAL_MODE 2 // AF2 - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) // #define RGBLIGHT_LAYERS // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF @@ -56,7 +57,7 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 +// #define OLED_IC OLED_IC_SH1106 // #define OLED_COLUMN_OFFSET 2 // #define OLED_DISPLAY_128X64 @@ -65,5 +66,3 @@ //#define OLED_DISPLAY_ADDRESS 0x3C #endif - - diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h index dfc6a7bdd4dd..84921df44339 100644 --- a/keyboards/uncertainty/halconf.h +++ b/keyboards/uncertainty/halconf.h @@ -1,6 +1,5 @@ #pragma once - #ifdef RGBLIGHT_ENABLE #undef HAL_USE_PWM #define HAL_USE_PWM TRUE @@ -9,5 +8,4 @@ #undef HAL_USE_I2C #define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file +#include_next diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json index 7e982dcb20c8..a2e643068e17 100644 --- a/keyboards/uncertainty/info.json +++ b/keyboards/uncertainty/info.json @@ -21,7 +21,7 @@ "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] }, - "url": "", + "url": "", "usb": { "device_version": "1.0.0", "pid": "0x0000", @@ -29,14 +29,14 @@ }, "encoder": { "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } + { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } ] }, "rgblight": { - "led_count": 8, + "led_count": 14, "pin": "B1", "sleep": true, - "max_brightness": 100, + "max_brightness": 255, "brightness_steps": 10, "layers": { "enabled": true, @@ -53,111 +53,111 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, + {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, + {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, + {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, + {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, + {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, + {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, + {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, + {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, + {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, + {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, + {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, + {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, + {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, + {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, + {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, + {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, + {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, + {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, + {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, + {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, + {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, + {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, + {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, + {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, + {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, + {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, + {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, + {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, + {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, + {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, + {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, + {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, + {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, + {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, + {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, + {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, + {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, + {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, + {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, + {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, + {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, + {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, + {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, + {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, + {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, + {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, + {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, + {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, + {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, + {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, + {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, + {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, + {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, + {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, + {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, + {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, + {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, + {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, + {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, + {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, + {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, + {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, + {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, + {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, + {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, + {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, + {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, + {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, + {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, + {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, + {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, + {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, + {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, + {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, + {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, + {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, + {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, + {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, + {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, + {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, + {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, + {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, + {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, + {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, + {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, + {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, + {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, + {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, + {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, + {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, + {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, + {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, + {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, + {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, + {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, + {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, + {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, + {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, + {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, + {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, + {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, + {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, + {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} ] } } -} \ No newline at end of file +} diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/uncertainty/keymaps/default/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c index 3b2b513402f3..141dea017066 100644 --- a/keyboards/uncertainty/keymaps/default/keymap.c +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -1,9 +1,17 @@ +#include "keycodes.h" #include QMK_KEYBOARD_H #include "print.h" #include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + char wpm_str[10]; + typedef union { uint32_t raw; struct { @@ -12,8 +20,8 @@ typedef union { } user_config_t; user_config_t user_config; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ @@ -27,34 +35,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + RGB_MOD, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#if defined(ENCODER_MAP_ENABLE) +#ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } }; #endif #ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 // Light LEDs 0 red when caps lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 ); // Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( @@ -83,8 +101,8 @@ void keyboard_post_init_user(void) { rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - rgblight_set_effect_range(2, 6); - + rgblight_set_effect_range(2, 12); + rgblight_enable(); //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); @@ -93,7 +111,7 @@ void keyboard_post_init_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case : + case RGB_MOD: if (record->event.pressed) { // Do something when pressed } else { @@ -140,35 +158,11 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! // } #ifdef OLED_ENABLE -// typedef enum { -// OLED_ROTATION_0 = 0, -// OLED_ROTATION_90 = 1, -// OLED_ROTATION_180 = 2, -// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 -// } oled_rotation_t; -// oled_rotation_t oled_init_user(oled_rotation_t rotation) { -// return OLED_ROTATION_90; -// } -// bool oled_task_user(void) { -// oled_write_P(PSTR("WPM: "), false); -// oled_write(get_u8_str(get_current_wpm(), '0'), false); -// return false; -// } -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 - }; - - oled_write_P(qmk_logo, false); -} +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen bool oled_task_user(void) { - //render_logo(); - //oled_set_cursor(1, 1); - oled_write_P(PSTR("WPM: "), false); - oled_write(get_u8_str(get_current_wpm(), '0'), false); + draw_bongo(true); return false; } #endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json deleted file mode 100644 index 127a66c02f3f..000000000000 --- a/keyboards/uncertainty/keymaps/default/keymap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "keyboard": "uncertainty", - "keymap": "default", - "layers": [ - ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] - ], - "layout": "LAYOUT" -} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk index 3086a27b34f2..c922e471fa86 100644 --- a/keyboards/uncertainty/keymaps/default/rules.mk +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -1 +1,2 @@ -//ENCODER_MAP_ENABLE = yes \ No newline at end of file +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c deleted file mode 100644 index b4ba6ecd2f2c..000000000000 --- a/keyboards/uncertainty/keymaps/test/keymap.c +++ /dev/null @@ -1,588 +0,0 @@ -#include QMK_KEYBOARD_H - - -#include "print.h" -#include -char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -/* Encoder mapping */ -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } -}; -#endif - -/* Keymap */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* 0 - * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ - * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ - * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ - * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | - * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | - * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ - * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ - * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ - * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - */ - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; -/* end Keymap */ - -/* OLED test */ -enum tap_dances { - TD_OLED, -}; -enum oled_test_modes { - // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. - TEST_FIRST, - TEST_LOGO = TEST_FIRST, - TEST_CHARACTERS, - TEST_SLOW_UPDATE, - TEST_ALL_ON, - TEST_FRAME, - TEST_ALL_OFF, - TEST_FILL_HORZ_0, - TEST_FILL_HORZ_1, - TEST_FILL_VERT_0, - TEST_FILL_VERT_1, - TEST_FILL_CHECKERBOARD_1, - TEST_FILL_CHECKERBOARD_2, - TEST_FILL_CHECKERBOARD_4, - TEST_LAST = TEST_FILL_CHECKERBOARD_4, - - // Special modes which are not reachable normally. - TEST_DRAW_ALWAYS_ON, - TEST_DRAW_ALWAYS_OFF, -}; - -static enum oled_test_modes test_mode = TEST_FIRST; - -static oled_rotation_t rotation = OLED_ROTATION_0; - -static bool scrolling; -static uint8_t scrolling_speed; -static bool need_update = true; -static bool draw_always; -static bool update_speed_test; -static uint32_t update_speed_start_timer; -static uint16_t update_speed_count; -static bool restart_test; - -static void stop_scrolling(void) { - if (scrolling) { - oled_scroll_off(); - scrolling = false; - } -} - -static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - // single hold - step through rotations - switch (rotation) { - case OLED_ROTATION_0: - rotation = OLED_ROTATION_90; - break; - case OLED_ROTATION_90: - rotation = OLED_ROTATION_180; - break; - case OLED_ROTATION_180: - rotation = OLED_ROTATION_270; - break; - default: - rotation = OLED_ROTATION_0; - break; - } - stop_scrolling(); - oled_init(rotation); - } else { - // single tap - step through test modes - if (test_mode < TEST_LAST) { - ++test_mode; - } else { - test_mode = TEST_FIRST; - } - stop_scrolling(); - oled_clear(); - } - restart_test = true; - need_update = true; - break; - - case 2: - if (state->pressed) { - // tap + hold - change scrolling speed - scrolling_speed = (scrolling_speed + 1) % 8; - stop_scrolling(); - oled_scroll_set_speed(scrolling_speed); - // Cannot reactivate scrolling here, because oled_scroll_off() - // marks the whole display as dirty, and oled_scroll_left() - // silently does nothing if either the display is dirty or - // scrolling is already active. - } else { - // double tap - toggle scrolling - if (!scrolling) { - scrolling = true; - oled_scroll_left(); - } else { - scrolling = false; - oled_scroll_off(); - } - } - need_update = true; - break; - - case 3: - if (state->pressed) { - // double tap + hold - toggle `draw_always` - draw_always = !draw_always; - if (draw_always) { - test_mode = TEST_DRAW_ALWAYS_ON; - } else { - test_mode = TEST_DRAW_ALWAYS_OFF; - } - stop_scrolling(); - oled_clear(); - restart_test = true; - need_update = true; - } else { - // triple tap - toggle update speed test - update_speed_test = !update_speed_test; - if (update_speed_test) { - stop_scrolling(); - update_speed_start_timer = timer_read32(); - update_speed_count = 0; - } - } - break; - case 4: - if (!state->pressed) { - // quadruple tap - step through brightness levels - oled_set_brightness(oled_get_brightness() + 0x10); - } - break; - default: - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; - -// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; - -// `bool oled_is_dirty(void)` does not exist at the moment -extern OLED_BLOCK_TYPE oled_dirty; - -static inline uint8_t pixel_width(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH; - } - return OLED_DISPLAY_HEIGHT; -} - -static inline uint8_t pixel_height(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT; - } - return OLED_DISPLAY_WIDTH; -} - -// Draw the QMK logo at the top left corner, clipping if it does not fit. -static void test_logo(void) { - uint8_t lines = oled_max_lines(); - if (lines > 3) { - lines = 3; - } - uint8_t chars = oled_max_chars(); - if (chars > 21) { - chars = 21; - } - for (uint8_t row = 0; row < lines; ++row) { - oled_set_cursor(0, row); - for (uint8_t col = 0; col < chars; ++col) { - oled_write_char(0x80 + 0x20 * row + col, false); - } - } -} - -static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; - -// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. -static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { - uint8_t width = pixel_width(); - uint8_t lines = oled_max_lines(); - uint16_t index = 0; - for (uint8_t row = 0; row < lines; ++row) { - for (uint8_t col = 0; col < width; ++col) { - uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; - oled_write_raw_byte(byte, index++); - } - } -} - -// Draw a frame at the edges of the OLED screen. -static void test_frame(void) { - uint8_t width = pixel_width(); - uint8_t height = pixel_height(); - for (uint8_t x = 0; x < width; ++x) { - oled_write_pixel(x, 0, true); - oled_write_pixel(x, height - 1, true); - } - for (uint8_t y = 1; y < height - 1; ++y) { - oled_write_pixel(0, y, true); - oled_write_pixel(width - 1, y, true); - } -} - -// Use all 94 visible ASCII characters for testing. -#define TEST_CHAR_COUNT ('~' - '!' + 1) - -static char get_test_char(uint8_t char_index) { return char_index + '!'; } - -// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters -// at once, the sequence is repeated the second time with inverted characters). -static void test_characters(void) { - uint8_t cols = oled_max_chars(); - uint8_t rows = oled_max_lines(); - bool invert = false; - uint8_t char_index = 0; - for (uint8_t row = 0; row < rows; ++row) { - for (uint8_t col = 0; col < cols; ++col) { - oled_write_char(get_test_char(char_index), invert); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - invert = !invert; - } - } - } -} - -// Test screen updating after drawing a single character or pixel. -void test_slow_update(void) { - static uint8_t phase, x, y, char_index, first_char; - static uint16_t timer; - static uint16_t delay = 500; - - if (restart_test) { - // Initialize all state variables before starting the test. - restart_test = false; - phase = 0; - x = 0; - y = 0; - char_index = 0; - first_char = 0; - delay = 500; - } else { - // Wait for the specified time between steps. - if (timer_elapsed(timer) < delay) { - return; - } - } - - timer = timer_read(); - switch (phase) { - case 0: - // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the - // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be - // overlapped by the inverted character background. - oled_set_cursor(x, y); - oled_write_char(get_test_char(char_index), false); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - } - if (++x >= oled_max_chars()) { - x = 0; - if (++y >= oled_max_lines()) { - // The whole screen was filled - start the next phase. - ++phase; - x = y = 0; - } - } - delay = 250; - break; - - case 1: - // Phase 1: draw a line along the left edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y < pixel_height() - 1) { - ++y; - } else { - // The bottom left corner is reached - start the next phase. - ++phase; - ++x; - } - delay = 50; - break; - - case 2: - // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x < pixel_width() - 1) { - ++x; - } else { - // The bottom right corner was reached - start the next phase. - ++phase; - --y; - } - delay = 50; - break; - - case 3: - // Phase 3: draw a line along the right edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y > 0) { - --y; - } else { - // The top right corner was reached - start the next phase. - ++phase; - --x; - } - delay = 50; - break; - - case 4: - // Phase 4: draw a line along the top edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x > 0) { - --x; - } else { - // The top left corner was reached - start the next phase. - ++phase; - } - delay = 50; - break; - - default: - // Restart from phase 0, but change the first character of the sequence to make screen updates visible. - if (++first_char >= TEST_CHAR_COUNT) { - first_char = 0; - } - phase = 0; - x = 0; - y = 0; - char_index = first_char; - delay = 500; - break; - } -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - oled_scroll_set_area(0, 0); - oled_scroll_set_speed(scrolling_speed); - return rotation; -} - -bool oled_task_user(void) { - if (update_speed_test) { - // Speed test mode - wait for screen update completion. - if (!oled_dirty) { - // Update statistics and send the measurement result to the console. - update_speed_count++; - if (update_speed_count % 256 == 0) { - uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); - } - - // Toggle between the "all on" and "all off" states and trigger the screen update again. - if (test_mode == TEST_ALL_ON) { - test_mode = TEST_ALL_OFF; - } else { - test_mode = TEST_ALL_ON; - } - need_update = true; - } - } - - // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on - // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty - // bits only when something has actually changed. However, redrawing the image only when some of the underlying - // data has changed is more efficient. Make it possible to test both modes here. - if (!draw_always || update_speed_test) { - // Draw the image only when the `need_update` flag is set, except for the "slow update" test. - // This mode is also forced when the screen update speed test is performed. - if (!need_update) { - if (test_mode != TEST_SLOW_UPDATE) { - return false; - } - } - need_update = false; - } - - switch (test_mode) { - case TEST_LOGO: - test_logo(); - break; - case TEST_CHARACTERS: - test_characters(); - break; - case TEST_SLOW_UPDATE: - test_slow_update(); - break; - case TEST_ALL_ON: - oled_write_raw_P(fill_ff, sizeof(fill_ff)); - break; - case TEST_FRAME: - test_frame(); - break; - case TEST_ALL_OFF: - // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous - // content of the buffer and always marks the whole buffer as dirty. - if (update_speed_test) { - oled_clear(); - } else { - test_fill(0x00, 0x00, 1); - } - break; - case TEST_FILL_HORZ_0: - test_fill(0x55, 0x55, 1); - break; - case TEST_FILL_HORZ_1: - test_fill(0xaa, 0xaa, 1); - break; - case TEST_FILL_VERT_0: - test_fill(0xff, 0x00, 1); - break; - case TEST_FILL_VERT_1: - test_fill(0x00, 0xff, 1); - break; - case TEST_FILL_CHECKERBOARD_1: - test_fill(0x55, 0xaa, 1); - break; - case TEST_FILL_CHECKERBOARD_2: - test_fill(0x33, 0xcc, 2); - break; - case TEST_FILL_CHECKERBOARD_4: - test_fill(0x0f, 0xf0, 4); - break; - - case TEST_DRAW_ALWAYS_ON: - oled_write_P(PSTR("Draw Always"), false); - break; - case TEST_DRAW_ALWAYS_OFF: - oled_write_P(PSTR("Draw Once"), false); - break; - } - return false; -} -/* -------------------------------------------------------------------*/ -/* end OLED test */ - -user_config_t user_config; - -/* RGB Test */ -#ifdef RGBLIGHT_ENABLE -// Light LEDs 0 red when caps lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 -); - -// Light LEDs 1 red when num lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 -); - -const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - indicators_off_layer, - my_capslock_layer, - my_numlock_layer -); - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(1, led_state.caps_lock); - rgblight_set_layer_state(2, led_state.num_lock); - return true; -} - -/* end RGB Test */ - -void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom_cyan(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - - // // Enable the LED layers - // rgblight_layers = my_rgb_layers; - // rgblight_set_layer_state(0, 1); - // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - // rgblight_set_effect_range(2, 6); - - // rgblight_enable(); - // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case : - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk deleted file mode 100644 index a40474b4d5c7..000000000000 --- a/keyboards/uncertainty/keymaps/test/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h deleted file mode 100644 index ade817c14d78..000000000000 --- a/keyboards/uncertainty/test/config.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* WS2812 driver config specifically for STM32F401 */ - -// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B1 - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 - - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF -#endif - -#define DEBUG_EEPROM_OUTPUT - -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 - -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -/* eeprom i2c driver config */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 -#define EXTERNAL_EEPROM_BYTE_COUNT 4096 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_WRITE_TIME 10 -//#define EEPROM_I2C_24LC32 - -/* OLED config */ -#ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 -#define OLED_UPDATE_INTERVAL 100 -#define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - -#endif - -/* encoder config */ -// #define ENCODERS_PAD_A { B12 } -// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h deleted file mode 100644 index dfc6a7bdd4dd..000000000000 --- a/keyboards/uncertainty/test/halconf.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - - -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif - -#undef HAL_USE_I2C -#define HAL_USE_I2C TRUE - - -#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json deleted file mode 100644 index 50695e5af536..000000000000 --- a/keyboards/uncertainty/test/info.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", - "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": true, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], - "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] - }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } - ] - }, - "rgblight": { - "led_count": 14, - "pin": "B1", - "sleep": true, - "max_brightness": 100, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, - "animations": { - "all": true, - "knight": true, - "rainbow_mood": true, - "rgb_test": true - } - }, - - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} - ] - } - } -} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h deleted file mode 100644 index 53d967f53473..000000000000 --- a/keyboards/uncertainty/test/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include_next - -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk deleted file mode 100644 index cbaaf52ddd1a..000000000000 --- a/keyboards/uncertainty/test/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm - -# using external i2c eeprom -EEPROM_DRIVER = i2c - -# using SSD1306 OLED driver -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled - -# using rotary encoder -# ENCODER_ENABLE = yes From fa454ea7105c68b4fdd919153d0be5c4454e7583 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:02:33 +0700 Subject: [PATCH 03/46] v0.1: change directory --- keyboards/{ => vinhcatba}/uncertainty/config.h | 0 keyboards/{ => vinhcatba}/uncertainty/halconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/info.json | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk | 0 keyboards/{ => vinhcatba}/uncertainty/kipythonlog | 0 keyboards/{ => vinhcatba}/uncertainty/mcuconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/placefp.py | 0 keyboards/{ => vinhcatba}/uncertainty/readme.md | 0 keyboards/{ => vinhcatba}/uncertainty/rules.mk | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/{ => vinhcatba}/uncertainty/config.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/halconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/info.json (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk (100%) rename keyboards/{ => vinhcatba}/uncertainty/kipythonlog (100%) rename keyboards/{ => vinhcatba}/uncertainty/mcuconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/placefp.py (100%) rename keyboards/{ => vinhcatba}/uncertainty/readme.md (100%) rename keyboards/{ => vinhcatba}/uncertainty/rules.mk (100%) diff --git a/keyboards/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h similarity index 100% rename from keyboards/uncertainty/config.h rename to keyboards/vinhcatba/uncertainty/config.h diff --git a/keyboards/uncertainty/halconf.h b/keyboards/vinhcatba/uncertainty/halconf.h similarity index 100% rename from keyboards/uncertainty/halconf.h rename to keyboards/vinhcatba/uncertainty/halconf.h diff --git a/keyboards/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json similarity index 100% rename from keyboards/uncertainty/info.json rename to keyboards/vinhcatba/uncertainty/info.json diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h similarity index 100% rename from keyboards/uncertainty/keymaps/default/bongo.h rename to keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c similarity index 100% rename from keyboards/uncertainty/keymaps/default/keymap.c rename to keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk similarity index 100% rename from keyboards/uncertainty/keymaps/default/rules.mk rename to keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog similarity index 100% rename from keyboards/uncertainty/kipythonlog rename to keyboards/vinhcatba/uncertainty/kipythonlog diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/vinhcatba/uncertainty/mcuconf.h similarity index 100% rename from keyboards/uncertainty/mcuconf.h rename to keyboards/vinhcatba/uncertainty/mcuconf.h diff --git a/keyboards/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py similarity index 100% rename from keyboards/uncertainty/placefp.py rename to keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md similarity index 100% rename from keyboards/uncertainty/readme.md rename to keyboards/vinhcatba/uncertainty/readme.md diff --git a/keyboards/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk similarity index 100% rename from keyboards/uncertainty/rules.mk rename to keyboards/vinhcatba/uncertainty/rules.mk From 818c6fa969dad6f3789f2727fac2ca1895fff1c3 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:04:02 +0700 Subject: [PATCH 04/46] v0.1: cleanup --- keyboards/vinhcatba/uncertainty/kipythonlog | 1667 ------------------- keyboards/vinhcatba/uncertainty/placefp.py | 55 - 2 files changed, 1722 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/kipythonlog delete mode 100644 keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/vinhcatba/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog deleted file mode 100644 index 7883889b77ec..000000000000 --- a/keyboards/vinhcatba/uncertainty/kipythonlog +++ /dev/null @@ -1,1667 +0,0 @@ -Py 0.9.8 -Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 -Type "help", "copyright", "credits" or "license" for more information. -Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py - -import pcbnew -pcbnew.GetBoard() - > -myboard = pcbnew.GetBoard() -for fp in myboard.GetFootprints(): - print(fp.GetReference()) - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -footprints = myboard.GetFootprints() -printf(footprints[0]) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'printf' is not defined -print(footprints[0]) -::value_type' at 0x00000218643C36F0> > -print(footprints[0].GetReference()) -D88 -print(footprints[0].fp_id) -Traceback (most recent call last): - File "", line 1, in -AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' -selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] -print(selected) -['D15'] -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) -... - File "", line 5 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - fi -... - File "", line 6 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - - -Traceback (most recent call last): - File "", line 2, in -AttributeError: 'FOOTPRINT' object has no attribute 'ref' -for fp in footprints: - try: - sheet_file = fp.GetProperty('Sheetfile') - # construct a list of all the footprints - mod_named_tuple = Footprint(fp=fp, - fp_id=self.get_footprint_id(fp), - sheet_id=self.get_sheet_path(fp)[0], - filename=self.get_sheet_path(fp)[1], - ref=fp.GetReference()) - self.footprints.append(mod_named_tuple) - except KeyError: - pass - pass - File "", line 13 - pass - ^ -IndentationError: unindent does not match any outer indentation level -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - File "", line 1 - fp_list = [] - ^ -SyntaxError: multiple statements found while compiling a single statement -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass -pass - File "", line 7 - pass - ^ -SyntaxError: invalid syntax -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass - - -Traceback (most recent call last): - File "", line 3, in -NameError: name 'Footprint' is not defined -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'fp_id' is not defined -fp_id = "" -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -print(selected) -['D15'] -selected -['D15'] -selected[0] -'D15' -for fp in footprints: - if fp.GetReference() == selected[0]: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D15 -print(fp_id) -D51D642D-4C52-4D3C-BA63-D62449DDB306 -def get_fp_id(fp): - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - else: - fp_id = None - return fp_id - - -for fp in footprints: - if get_fp_id(fp) == fp_id: - print(fp.GetReference()) - - - -D15 -def get_fp_diode(footprints): - diode_list = [] - - - -diode_list = [] -for fp in footprints: - ref = fp.GetReference() - if ref[0] == 'D': - diode_list.append(fp) - - -print(diode_list) -[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort - -diode_list.sort() -for fp in diode_list print(fp.GetReference()) - File "", line 1 - for fp in diode_list print(fp.GetReference()) - ^ -SyntaxError: invalid syntax -for fp in diode_list: print(fp.GetReference()) - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort() -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -def sortByRef(e): - return e.GetReference() - - -diode_list.sort(key=sortByRef) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D10 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D11 -D110 -D111 -D112 -D113 -D114 -D115 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D2 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D3 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D4 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D5 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D6 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D7 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D8 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D9 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -def sortByRefNew(e): - ref = e.GetReference() - return int(ref[1:]) - - -diode_list.sort(key=sortByRefNew) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D110 -D111 -D112 -D113 -D114 -D115 -def fp_set_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.SetBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.SetBrightened() - - - - -for i in range(diode_list): - fp_set_highlight(diode_list[i]) - i = i + 17 - - -Traceback (most recent call last): - File "", line 1, in -TypeError: 'list' object cannot be interpreted as an integer -for col in range(0,105): - fp_set_highlight(diode_list[col]) - col = col + 17 - - -pcbnew.Refresh() -for col in range(0,105): - print(diode_list[col].GetReference()) - col = col + 17 - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -for i in range(0,105,17): - print(diode_list[i].GetReference()) - - -D1 -D18 -D35 -D52 -D69 -D86 -D103 -for i in range(0,105,18): - print(diode_list[i].GetReference()) - . - - File "", line 3 - . - ^ -SyntaxError: invalid syntax -for i in range(0,105,18): - print(diode_list[i].GetReference()) - - -D1 -D19 -D37 -D55 -D73 -D91 -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def fp_clear_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.ClearBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.ClearBrightened() - -for fp in diode_list: - fp_clear_highlight(fp) - -pcbnew.Refresh() -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -fp_to_place = [] -for i in range(0,105,18): - fp_to_place.append(diode_list[i]) - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in -TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'list' object has no attribute 'GetPosition' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 17, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 20, in place_linear -NameError: name 'SCALE' is not defined -SCALE = 1000000.0 -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 24, in place_linear -ZeroDivisionError: integer division or modulo by zero -place_linear(fp_to_place, 3, 0, 1, 0) -pcbnew.Refresh() diff --git a/keyboards/vinhcatba/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py deleted file mode 100644 index dc5954624e4c..000000000000 --- a/keyboards/vinhcatba/uncertainty/placefp.py +++ /dev/null @@ -1,55 +0,0 @@ -import pcbnew - -SCALE = 1000000.0 -board = pcbnew.GetBoard() - -def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - #ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = -1 #footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): - #row = len(footprints_to_place) / col - - #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] - #first row - place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) - for i in range(col): - place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) - pcbnew.Refresh() - -def get_selected(): - #get list of selected fp - selected = [x for x in board.GetFootprints() if x.IsSelected()] - return selected - #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) -def sort_by_ref(fpList, reversed=False): - str = fpList[0].GetReference() - for i, char in enumerate(str): - # Checking if char is numeric - if char.isdigit(): - index = i - break - fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) - return fpList From 06e5851bd681016be6aa255d80e496f3fe711f1d Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:22:40 +0700 Subject: [PATCH 05/46] v0.2: update layers --- .../vinhcatba/uncertainty/keymaps/default/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 141dea017066..aa6fc3e01e48 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -42,24 +42,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, - RGB_MOD, 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_P4, KC_P5, KC_P6, + KC_CALC, 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_P4, KC_P5, KC_P6, C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif From da179df6c53a12adea705cf195fadf0f33543876 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:26:40 +0700 Subject: [PATCH 06/46] v0.3: add VIA support --- keyboards/vinhcatba/uncertainty/info.json | 2 +- .../uncertainty/keymaps/default/keymap.c | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index a2e643068e17..7364a9bbc422 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -25,7 +25,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0x564C" }, "encoder": { "rotary": [ diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index aa6fc3e01e48..06bafdb4541a 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -47,19 +47,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; #endif From 9fe42a64b60286205122b55c5ff2c4151383e60c Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:28:18 +0700 Subject: [PATCH 07/46] v0.3: add VIA support (continue) --- .../vinhcatba/uncertainty/keymaps/via/bongo.h | 514 ++++++++++++++++++ .../uncertainty/keymaps/via/keymap.c | 186 +++++++ .../uncertainty/keymaps/via/rules.mk | 5 + 3 files changed, 705 insertions(+) create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c new file mode 100644 index 000000000000..06bafdb4541a --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -0,0 +1,186 @@ +#include "keycodes.h" +#include QMK_KEYBOARD_H + + +#include "print.h" +#include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + +char wpm_str[10]; + +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CALC, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 12); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_MOD: + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE + +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen +bool oled_task_user(void) { + draw_bongo(true); + return false; +} +#endif diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk new file mode 100644 index 000000000000..c4731c6cab8c --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes From d4cefb4fe85eb246104f56cd18384378f936d23a Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Fri, 19 May 2023 16:31:35 +0700 Subject: [PATCH 08/46] vinh: test fw for uncertainty (deprecated) --- keyboards/uncertainty/chconf.h.old | 25 + keyboards/uncertainty/config.h | 69 + keyboards/uncertainty/halconf.h | 13 + keyboards/uncertainty/info.json | 163 ++ .../uncertainty/keymaps/default/keymap.c | 174 ++ .../uncertainty/keymaps/default/keymap.json | 8 + .../uncertainty/keymaps/default/rules.mk | 1 + keyboards/uncertainty/keymaps/test/keymap.c | 588 ++++++ keyboards/uncertainty/keymaps/test/rules.mk | 1 + keyboards/uncertainty/kipythonlog | 1667 +++++++++++++++++ keyboards/uncertainty/mcuconf.h | 10 + keyboards/uncertainty/placefp.py | 55 + keyboards/uncertainty/readme.md | 27 + keyboards/uncertainty/rules.mk | 10 + keyboards/uncertainty/test/config.h | 71 + keyboards/uncertainty/test/halconf.h | 13 + keyboards/uncertainty/test/info.json | 163 ++ keyboards/uncertainty/test/mcuconf.h | 10 + keyboards/uncertainty/test/rules.mk | 13 + 19 files changed, 3081 insertions(+) create mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/config.h create mode 100644 keyboards/uncertainty/halconf.h create mode 100644 keyboards/uncertainty/info.json create mode 100644 keyboards/uncertainty/keymaps/default/keymap.c create mode 100644 keyboards/uncertainty/keymaps/default/keymap.json create mode 100644 keyboards/uncertainty/keymaps/default/rules.mk create mode 100644 keyboards/uncertainty/keymaps/test/keymap.c create mode 100644 keyboards/uncertainty/keymaps/test/rules.mk create mode 100644 keyboards/uncertainty/kipythonlog create mode 100644 keyboards/uncertainty/mcuconf.h create mode 100644 keyboards/uncertainty/placefp.py create mode 100644 keyboards/uncertainty/readme.md create mode 100644 keyboards/uncertainty/rules.mk create mode 100644 keyboards/uncertainty/test/config.h create mode 100644 keyboards/uncertainty/test/halconf.h create mode 100644 keyboards/uncertainty/test/info.json create mode 100644 keyboards/uncertainty/test/mcuconf.h create mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old new file mode 100644 index 000000000000..a6e216133f50 --- /dev/null +++ b/keyboards/uncertainty/chconf.h.old @@ -0,0 +1,25 @@ +#pragma once +// #include_next + +#undef CH_CFG_ST_FREQUENCY +#define CH_CFG_ST_FREQUENCY 10000 + +#undef CH_CFG_FACTORY_OBJECTS_REGISTRY +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#undef CH_CFG_FACTORY_GENERIC_BUFFERS +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#undef CH_CFG_FACTORY_SEMAPHORES +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#undef CH_CFG_FACTORY_MAILBOXES +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#undef CH_CFG_FACTORY_OBJ_FIFOS +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#undef CH_CFG_FACTORY_PIPES +#define CH_CFG_FACTORY_PIPES TRUE +#include_next + diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h new file mode 100644 index 000000000000..9eb0322b7adc --- /dev/null +++ b/keyboards/uncertainty/config.h @@ -0,0 +1,69 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B8 + #define WS2812_PWM_DRIVER PWMD3 // TIM4 + #define WS2812_PWM_CHANNEL 4 // CH3 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + + diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json new file mode 100644 index 000000000000..7e982dcb20c8 --- /dev/null +++ b/keyboards/uncertainty/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 8, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b2b513402f3 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -0,0 +1,174 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 6); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE +// typedef enum { +// OLED_ROTATION_0 = 0, +// OLED_ROTATION_90 = 1, +// OLED_ROTATION_180 = 2, +// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +// } oled_rotation_t; +// oled_rotation_t oled_init_user(oled_rotation_t rotation) { +// return OLED_ROTATION_90; +// } +// bool oled_task_user(void) { +// oled_write_P(PSTR("WPM: "), false); +// oled_write(get_u8_str(get_current_wpm(), '0'), false); +// return false; +// } +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +bool oled_task_user(void) { + //render_logo(); + //oled_set_cursor(1, 1); + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + return false; +} +#endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json new file mode 100644 index 000000000000..127a66c02f3f --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.json @@ -0,0 +1,8 @@ +{ + "keyboard": "uncertainty", + "keymap": "default", + "layers": [ + ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] + ], + "layout": "LAYOUT" +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk new file mode 100644 index 000000000000..3086a27b34f2 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -0,0 +1 @@ +//ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c new file mode 100644 index 000000000000..b4ba6ecd2f2c --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/keymap.c @@ -0,0 +1,588 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +/* Encoder mapping */ +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } +}; +#endif + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; +/* end Keymap */ + +/* OLED test */ +enum tap_dances { + TD_OLED, +}; +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +bool oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return false; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } + return false; +} +/* -------------------------------------------------------------------*/ +/* end OLED test */ + +user_config_t user_config; + +/* RGB Test */ +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +/* end RGB Test */ + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + + // // Enable the LED layers + // rgblight_layers = my_rgb_layers; + // rgblight_set_layer_state(0, 1); + // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + // rgblight_set_effect_range(2, 6); + + // rgblight_enable(); + // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/uncertainty/kipythonlog new file mode 100644 index 000000000000..7883889b77ec --- /dev/null +++ b/keyboards/uncertainty/kipythonlog @@ -0,0 +1,1667 @@ +Py 0.9.8 +Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py + +import pcbnew +pcbnew.GetBoard() + > +myboard = pcbnew.GetBoard() +for fp in myboard.GetFootprints(): + print(fp.GetReference()) + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +footprints = myboard.GetFootprints() +printf(footprints[0]) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'printf' is not defined +print(footprints[0]) +::value_type' at 0x00000218643C36F0> > +print(footprints[0].GetReference()) +D88 +print(footprints[0].fp_id) +Traceback (most recent call last): + File "", line 1, in +AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' +selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] +print(selected) +['D15'] +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) +... + File "", line 5 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + fi +... + File "", line 6 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + + +Traceback (most recent call last): + File "", line 2, in +AttributeError: 'FOOTPRINT' object has no attribute 'ref' +for fp in footprints: + try: + sheet_file = fp.GetProperty('Sheetfile') + # construct a list of all the footprints + mod_named_tuple = Footprint(fp=fp, + fp_id=self.get_footprint_id(fp), + sheet_id=self.get_sheet_path(fp)[0], + filename=self.get_sheet_path(fp)[1], + ref=fp.GetReference()) + self.footprints.append(mod_named_tuple) + except KeyError: + pass + pass + File "", line 13 + pass + ^ +IndentationError: unindent does not match any outer indentation level +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + File "", line 1 + fp_list = [] + ^ +SyntaxError: multiple statements found while compiling a single statement +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass +pass + File "", line 7 + pass + ^ +SyntaxError: invalid syntax +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass + + +Traceback (most recent call last): + File "", line 3, in +NameError: name 'Footprint' is not defined +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'fp_id' is not defined +fp_id = "" +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +print(selected) +['D15'] +selected +['D15'] +selected[0] +'D15' +for fp in footprints: + if fp.GetReference() == selected[0]: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D15 +print(fp_id) +D51D642D-4C52-4D3C-BA63-D62449DDB306 +def get_fp_id(fp): + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + else: + fp_id = None + return fp_id + + +for fp in footprints: + if get_fp_id(fp) == fp_id: + print(fp.GetReference()) + + + +D15 +def get_fp_diode(footprints): + diode_list = [] + + + +diode_list = [] +for fp in footprints: + ref = fp.GetReference() + if ref[0] == 'D': + diode_list.append(fp) + + +print(diode_list) +[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort + +diode_list.sort() +for fp in diode_list print(fp.GetReference()) + File "", line 1 + for fp in diode_list print(fp.GetReference()) + ^ +SyntaxError: invalid syntax +for fp in diode_list: print(fp.GetReference()) + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort() +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +def sortByRef(e): + return e.GetReference() + + +diode_list.sort(key=sortByRef) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D10 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D11 +D110 +D111 +D112 +D113 +D114 +D115 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D2 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D3 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D4 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D5 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D6 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D7 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D8 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D9 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +def sortByRefNew(e): + ref = e.GetReference() + return int(ref[1:]) + + +diode_list.sort(key=sortByRefNew) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D110 +D111 +D112 +D113 +D114 +D115 +def fp_set_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.SetBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.SetBrightened() + + + + +for i in range(diode_list): + fp_set_highlight(diode_list[i]) + i = i + 17 + + +Traceback (most recent call last): + File "", line 1, in +TypeError: 'list' object cannot be interpreted as an integer +for col in range(0,105): + fp_set_highlight(diode_list[col]) + col = col + 17 + + +pcbnew.Refresh() +for col in range(0,105): + print(diode_list[col].GetReference()) + col = col + 17 + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +for i in range(0,105,17): + print(diode_list[i].GetReference()) + + +D1 +D18 +D35 +D52 +D69 +D86 +D103 +for i in range(0,105,18): + print(diode_list[i].GetReference()) + . + + File "", line 3 + . + ^ +SyntaxError: invalid syntax +for i in range(0,105,18): + print(diode_list[i].GetReference()) + + +D1 +D19 +D37 +D55 +D73 +D91 +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def fp_clear_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.ClearBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.ClearBrightened() + +for fp in diode_list: + fp_clear_highlight(fp) + +pcbnew.Refresh() +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +fp_to_place = [] +for i in range(0,105,18): + fp_to_place.append(diode_list[i]) + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in +TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'list' object has no attribute 'GetPosition' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 17, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 20, in place_linear +NameError: name 'SCALE' is not defined +SCALE = 1000000.0 +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 24, in place_linear +ZeroDivisionError: integer division or modulo by zero +place_linear(fp_to_place, 3, 0, 1, 0) +pcbnew.Refresh() diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/uncertainty/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/placefp.py b/keyboards/uncertainty/placefp.py new file mode 100644 index 000000000000..dc5954624e4c --- /dev/null +++ b/keyboards/uncertainty/placefp.py @@ -0,0 +1,55 @@ +import pcbnew + +SCALE = 1000000.0 +board = pcbnew.GetBoard() + +def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + #ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = -1 #footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): + #row = len(footprints_to_place) / col + + #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] + #first row + place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) + for i in range(col): + place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) + pcbnew.Refresh() + +def get_selected(): + #get list of selected fp + selected = [x for x in board.GetFootprints() if x.IsSelected()] + return selected + #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) +def sort_by_ref(fpList, reversed=False): + str = fpList[0].GetReference() + for i, char in enumerate(str): + # Checking if char is numeric + if char.isdigit(): + index = i + break + fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) + return fpList diff --git a/keyboards/uncertainty/readme.md b/keyboards/uncertainty/readme.md new file mode 100644 index 000000000000..cd3c36958e06 --- /dev/null +++ b/keyboards/uncertainty/readme.md @@ -0,0 +1,27 @@ +# uncertainty + +![uncertainty](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make uncertainty:default + +Flashing example for this keyboard: + + make uncertainty:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/uncertainty/rules.mk b/keyboards/uncertainty/rules.mk new file mode 100644 index 000000000000..6b7648feb02f --- /dev/null +++ b/keyboards/uncertainty/rules.mk @@ -0,0 +1,10 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h new file mode 100644 index 000000000000..ade817c14d78 --- /dev/null +++ b/keyboards/uncertainty/test/config.h @@ -0,0 +1,71 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B1 + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + +/* encoder config */ +// #define ENCODERS_PAD_A { B12 } +// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/test/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json new file mode 100644 index 000000000000..50695e5af536 --- /dev/null +++ b/keyboards/uncertainty/test/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 14, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/test/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk new file mode 100644 index 000000000000..cbaaf52ddd1a --- /dev/null +++ b/keyboards/uncertainty/test/rules.mk @@ -0,0 +1,13 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled + +# using rotary encoder +# ENCODER_ENABLE = yes From 66057776d06a44e27bb04ebabf8ba4975e8e15a0 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 01:55:05 +0700 Subject: [PATCH 09/46] v0.1: update base firmware with 2 layers, use bongo cat animation for oled --- keyboards/uncertainty/chconf.h.old | 25 - keyboards/uncertainty/config.h | 17 +- keyboards/uncertainty/halconf.h | 4 +- keyboards/uncertainty/info.json | 218 +++---- keyboards/uncertainty/keymaps/default/bongo.h | 514 +++++++++++++++ .../uncertainty/keymaps/default/keymap.c | 80 ++- .../uncertainty/keymaps/default/keymap.json | 8 - .../uncertainty/keymaps/default/rules.mk | 3 +- keyboards/uncertainty/keymaps/test/keymap.c | 588 ------------------ keyboards/uncertainty/keymaps/test/rules.mk | 1 - keyboards/uncertainty/test/config.h | 71 --- keyboards/uncertainty/test/halconf.h | 13 - keyboards/uncertainty/test/info.json | 163 ----- keyboards/uncertainty/test/mcuconf.h | 10 - keyboards/uncertainty/test/rules.mk | 13 - 15 files changed, 671 insertions(+), 1057 deletions(-) delete mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/keymaps/default/bongo.h delete mode 100644 keyboards/uncertainty/keymaps/default/keymap.json delete mode 100644 keyboards/uncertainty/keymaps/test/keymap.c delete mode 100644 keyboards/uncertainty/keymaps/test/rules.mk delete mode 100644 keyboards/uncertainty/test/config.h delete mode 100644 keyboards/uncertainty/test/halconf.h delete mode 100644 keyboards/uncertainty/test/info.json delete mode 100644 keyboards/uncertainty/test/mcuconf.h delete mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old deleted file mode 100644 index a6e216133f50..000000000000 --- a/keyboards/uncertainty/chconf.h.old +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -// #include_next - -#undef CH_CFG_ST_FREQUENCY -#define CH_CFG_ST_FREQUENCY 10000 - -#undef CH_CFG_FACTORY_OBJECTS_REGISTRY -#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE - -#undef CH_CFG_FACTORY_GENERIC_BUFFERS -#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE - -#undef CH_CFG_FACTORY_SEMAPHORES -#define CH_CFG_FACTORY_SEMAPHORES TRUE - -#undef CH_CFG_FACTORY_MAILBOXES -#define CH_CFG_FACTORY_MAILBOXES TRUE - -#undef CH_CFG_FACTORY_OBJ_FIFOS -#define CH_CFG_FACTORY_OBJ_FIFOS TRUE - -#undef CH_CFG_FACTORY_PIPES -#define CH_CFG_FACTORY_PIPES TRUE -#include_next - diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h index 9eb0322b7adc..79407df65bd2 100644 --- a/keyboards/uncertainty/config.h +++ b/keyboards/uncertainty/config.h @@ -21,15 +21,16 @@ /* WS2812 driver config specifically for STM32F401 */ -// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B8 - #define WS2812_PWM_DRIVER PWMD3 // TIM4 - #define WS2812_PWM_CHANNEL 4 // CH3 + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 #define WS2812_PWM_PAL_MODE 2 // AF2 - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) // #define RGBLIGHT_LAYERS // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF @@ -56,7 +57,7 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 +// #define OLED_IC OLED_IC_SH1106 // #define OLED_COLUMN_OFFSET 2 // #define OLED_DISPLAY_128X64 @@ -65,5 +66,3 @@ //#define OLED_DISPLAY_ADDRESS 0x3C #endif - - diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h index dfc6a7bdd4dd..84921df44339 100644 --- a/keyboards/uncertainty/halconf.h +++ b/keyboards/uncertainty/halconf.h @@ -1,6 +1,5 @@ #pragma once - #ifdef RGBLIGHT_ENABLE #undef HAL_USE_PWM #define HAL_USE_PWM TRUE @@ -9,5 +8,4 @@ #undef HAL_USE_I2C #define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file +#include_next diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json index 7e982dcb20c8..a2e643068e17 100644 --- a/keyboards/uncertainty/info.json +++ b/keyboards/uncertainty/info.json @@ -21,7 +21,7 @@ "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] }, - "url": "", + "url": "", "usb": { "device_version": "1.0.0", "pid": "0x0000", @@ -29,14 +29,14 @@ }, "encoder": { "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } + { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } ] }, "rgblight": { - "led_count": 8, + "led_count": 14, "pin": "B1", "sleep": true, - "max_brightness": 100, + "max_brightness": 255, "brightness_steps": 10, "layers": { "enabled": true, @@ -53,111 +53,111 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, + {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, + {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, + {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, + {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, + {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, + {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, + {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, + {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, + {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, + {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, + {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, + {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, + {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, + {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, + {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, + {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, + {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, + {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, + {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, + {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, + {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, + {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, + {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, + {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, + {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, + {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, + {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, + {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, + {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, + {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, + {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, + {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, + {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, + {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, + {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, + {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, + {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, + {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, + {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, + {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, + {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, + {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, + {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, + {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, + {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, + {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, + {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, + {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, + {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, + {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, + {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, + {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, + {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, + {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, + {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, + {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, + {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, + {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, + {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, + {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, + {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, + {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, + {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, + {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, + {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, + {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, + {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, + {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, + {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, + {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, + {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, + {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, + {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, + {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, + {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, + {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, + {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, + {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, + {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, + {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, + {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, + {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, + {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, + {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, + {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, + {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, + {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, + {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, + {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, + {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, + {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, + {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, + {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, + {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, + {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, + {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, + {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, + {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, + {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, + {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, + {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, + {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, + {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} ] } } -} \ No newline at end of file +} diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/uncertainty/keymaps/default/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c index 3b2b513402f3..141dea017066 100644 --- a/keyboards/uncertainty/keymaps/default/keymap.c +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -1,9 +1,17 @@ +#include "keycodes.h" #include QMK_KEYBOARD_H #include "print.h" #include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + char wpm_str[10]; + typedef union { uint32_t raw; struct { @@ -12,8 +20,8 @@ typedef union { } user_config_t; user_config_t user_config; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ @@ -27,34 +35,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + RGB_MOD, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#if defined(ENCODER_MAP_ENABLE) +#ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } }; #endif #ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 // Light LEDs 0 red when caps lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 ); // Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( @@ -83,8 +101,8 @@ void keyboard_post_init_user(void) { rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - rgblight_set_effect_range(2, 6); - + rgblight_set_effect_range(2, 12); + rgblight_enable(); //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); @@ -93,7 +111,7 @@ void keyboard_post_init_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case : + case RGB_MOD: if (record->event.pressed) { // Do something when pressed } else { @@ -140,35 +158,11 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! // } #ifdef OLED_ENABLE -// typedef enum { -// OLED_ROTATION_0 = 0, -// OLED_ROTATION_90 = 1, -// OLED_ROTATION_180 = 2, -// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 -// } oled_rotation_t; -// oled_rotation_t oled_init_user(oled_rotation_t rotation) { -// return OLED_ROTATION_90; -// } -// bool oled_task_user(void) { -// oled_write_P(PSTR("WPM: "), false); -// oled_write(get_u8_str(get_current_wpm(), '0'), false); -// return false; -// } -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 - }; - - oled_write_P(qmk_logo, false); -} +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen bool oled_task_user(void) { - //render_logo(); - //oled_set_cursor(1, 1); - oled_write_P(PSTR("WPM: "), false); - oled_write(get_u8_str(get_current_wpm(), '0'), false); + draw_bongo(true); return false; } #endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json deleted file mode 100644 index 127a66c02f3f..000000000000 --- a/keyboards/uncertainty/keymaps/default/keymap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "keyboard": "uncertainty", - "keymap": "default", - "layers": [ - ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] - ], - "layout": "LAYOUT" -} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk index 3086a27b34f2..c922e471fa86 100644 --- a/keyboards/uncertainty/keymaps/default/rules.mk +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -1 +1,2 @@ -//ENCODER_MAP_ENABLE = yes \ No newline at end of file +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c deleted file mode 100644 index b4ba6ecd2f2c..000000000000 --- a/keyboards/uncertainty/keymaps/test/keymap.c +++ /dev/null @@ -1,588 +0,0 @@ -#include QMK_KEYBOARD_H - - -#include "print.h" -#include -char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -/* Encoder mapping */ -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } -}; -#endif - -/* Keymap */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* 0 - * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ - * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ - * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ - * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | - * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | - * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ - * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ - * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ - * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - */ - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; -/* end Keymap */ - -/* OLED test */ -enum tap_dances { - TD_OLED, -}; -enum oled_test_modes { - // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. - TEST_FIRST, - TEST_LOGO = TEST_FIRST, - TEST_CHARACTERS, - TEST_SLOW_UPDATE, - TEST_ALL_ON, - TEST_FRAME, - TEST_ALL_OFF, - TEST_FILL_HORZ_0, - TEST_FILL_HORZ_1, - TEST_FILL_VERT_0, - TEST_FILL_VERT_1, - TEST_FILL_CHECKERBOARD_1, - TEST_FILL_CHECKERBOARD_2, - TEST_FILL_CHECKERBOARD_4, - TEST_LAST = TEST_FILL_CHECKERBOARD_4, - - // Special modes which are not reachable normally. - TEST_DRAW_ALWAYS_ON, - TEST_DRAW_ALWAYS_OFF, -}; - -static enum oled_test_modes test_mode = TEST_FIRST; - -static oled_rotation_t rotation = OLED_ROTATION_0; - -static bool scrolling; -static uint8_t scrolling_speed; -static bool need_update = true; -static bool draw_always; -static bool update_speed_test; -static uint32_t update_speed_start_timer; -static uint16_t update_speed_count; -static bool restart_test; - -static void stop_scrolling(void) { - if (scrolling) { - oled_scroll_off(); - scrolling = false; - } -} - -static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - // single hold - step through rotations - switch (rotation) { - case OLED_ROTATION_0: - rotation = OLED_ROTATION_90; - break; - case OLED_ROTATION_90: - rotation = OLED_ROTATION_180; - break; - case OLED_ROTATION_180: - rotation = OLED_ROTATION_270; - break; - default: - rotation = OLED_ROTATION_0; - break; - } - stop_scrolling(); - oled_init(rotation); - } else { - // single tap - step through test modes - if (test_mode < TEST_LAST) { - ++test_mode; - } else { - test_mode = TEST_FIRST; - } - stop_scrolling(); - oled_clear(); - } - restart_test = true; - need_update = true; - break; - - case 2: - if (state->pressed) { - // tap + hold - change scrolling speed - scrolling_speed = (scrolling_speed + 1) % 8; - stop_scrolling(); - oled_scroll_set_speed(scrolling_speed); - // Cannot reactivate scrolling here, because oled_scroll_off() - // marks the whole display as dirty, and oled_scroll_left() - // silently does nothing if either the display is dirty or - // scrolling is already active. - } else { - // double tap - toggle scrolling - if (!scrolling) { - scrolling = true; - oled_scroll_left(); - } else { - scrolling = false; - oled_scroll_off(); - } - } - need_update = true; - break; - - case 3: - if (state->pressed) { - // double tap + hold - toggle `draw_always` - draw_always = !draw_always; - if (draw_always) { - test_mode = TEST_DRAW_ALWAYS_ON; - } else { - test_mode = TEST_DRAW_ALWAYS_OFF; - } - stop_scrolling(); - oled_clear(); - restart_test = true; - need_update = true; - } else { - // triple tap - toggle update speed test - update_speed_test = !update_speed_test; - if (update_speed_test) { - stop_scrolling(); - update_speed_start_timer = timer_read32(); - update_speed_count = 0; - } - } - break; - case 4: - if (!state->pressed) { - // quadruple tap - step through brightness levels - oled_set_brightness(oled_get_brightness() + 0x10); - } - break; - default: - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; - -// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; - -// `bool oled_is_dirty(void)` does not exist at the moment -extern OLED_BLOCK_TYPE oled_dirty; - -static inline uint8_t pixel_width(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH; - } - return OLED_DISPLAY_HEIGHT; -} - -static inline uint8_t pixel_height(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT; - } - return OLED_DISPLAY_WIDTH; -} - -// Draw the QMK logo at the top left corner, clipping if it does not fit. -static void test_logo(void) { - uint8_t lines = oled_max_lines(); - if (lines > 3) { - lines = 3; - } - uint8_t chars = oled_max_chars(); - if (chars > 21) { - chars = 21; - } - for (uint8_t row = 0; row < lines; ++row) { - oled_set_cursor(0, row); - for (uint8_t col = 0; col < chars; ++col) { - oled_write_char(0x80 + 0x20 * row + col, false); - } - } -} - -static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; - -// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. -static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { - uint8_t width = pixel_width(); - uint8_t lines = oled_max_lines(); - uint16_t index = 0; - for (uint8_t row = 0; row < lines; ++row) { - for (uint8_t col = 0; col < width; ++col) { - uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; - oled_write_raw_byte(byte, index++); - } - } -} - -// Draw a frame at the edges of the OLED screen. -static void test_frame(void) { - uint8_t width = pixel_width(); - uint8_t height = pixel_height(); - for (uint8_t x = 0; x < width; ++x) { - oled_write_pixel(x, 0, true); - oled_write_pixel(x, height - 1, true); - } - for (uint8_t y = 1; y < height - 1; ++y) { - oled_write_pixel(0, y, true); - oled_write_pixel(width - 1, y, true); - } -} - -// Use all 94 visible ASCII characters for testing. -#define TEST_CHAR_COUNT ('~' - '!' + 1) - -static char get_test_char(uint8_t char_index) { return char_index + '!'; } - -// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters -// at once, the sequence is repeated the second time with inverted characters). -static void test_characters(void) { - uint8_t cols = oled_max_chars(); - uint8_t rows = oled_max_lines(); - bool invert = false; - uint8_t char_index = 0; - for (uint8_t row = 0; row < rows; ++row) { - for (uint8_t col = 0; col < cols; ++col) { - oled_write_char(get_test_char(char_index), invert); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - invert = !invert; - } - } - } -} - -// Test screen updating after drawing a single character or pixel. -void test_slow_update(void) { - static uint8_t phase, x, y, char_index, first_char; - static uint16_t timer; - static uint16_t delay = 500; - - if (restart_test) { - // Initialize all state variables before starting the test. - restart_test = false; - phase = 0; - x = 0; - y = 0; - char_index = 0; - first_char = 0; - delay = 500; - } else { - // Wait for the specified time between steps. - if (timer_elapsed(timer) < delay) { - return; - } - } - - timer = timer_read(); - switch (phase) { - case 0: - // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the - // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be - // overlapped by the inverted character background. - oled_set_cursor(x, y); - oled_write_char(get_test_char(char_index), false); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - } - if (++x >= oled_max_chars()) { - x = 0; - if (++y >= oled_max_lines()) { - // The whole screen was filled - start the next phase. - ++phase; - x = y = 0; - } - } - delay = 250; - break; - - case 1: - // Phase 1: draw a line along the left edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y < pixel_height() - 1) { - ++y; - } else { - // The bottom left corner is reached - start the next phase. - ++phase; - ++x; - } - delay = 50; - break; - - case 2: - // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x < pixel_width() - 1) { - ++x; - } else { - // The bottom right corner was reached - start the next phase. - ++phase; - --y; - } - delay = 50; - break; - - case 3: - // Phase 3: draw a line along the right edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y > 0) { - --y; - } else { - // The top right corner was reached - start the next phase. - ++phase; - --x; - } - delay = 50; - break; - - case 4: - // Phase 4: draw a line along the top edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x > 0) { - --x; - } else { - // The top left corner was reached - start the next phase. - ++phase; - } - delay = 50; - break; - - default: - // Restart from phase 0, but change the first character of the sequence to make screen updates visible. - if (++first_char >= TEST_CHAR_COUNT) { - first_char = 0; - } - phase = 0; - x = 0; - y = 0; - char_index = first_char; - delay = 500; - break; - } -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - oled_scroll_set_area(0, 0); - oled_scroll_set_speed(scrolling_speed); - return rotation; -} - -bool oled_task_user(void) { - if (update_speed_test) { - // Speed test mode - wait for screen update completion. - if (!oled_dirty) { - // Update statistics and send the measurement result to the console. - update_speed_count++; - if (update_speed_count % 256 == 0) { - uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); - } - - // Toggle between the "all on" and "all off" states and trigger the screen update again. - if (test_mode == TEST_ALL_ON) { - test_mode = TEST_ALL_OFF; - } else { - test_mode = TEST_ALL_ON; - } - need_update = true; - } - } - - // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on - // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty - // bits only when something has actually changed. However, redrawing the image only when some of the underlying - // data has changed is more efficient. Make it possible to test both modes here. - if (!draw_always || update_speed_test) { - // Draw the image only when the `need_update` flag is set, except for the "slow update" test. - // This mode is also forced when the screen update speed test is performed. - if (!need_update) { - if (test_mode != TEST_SLOW_UPDATE) { - return false; - } - } - need_update = false; - } - - switch (test_mode) { - case TEST_LOGO: - test_logo(); - break; - case TEST_CHARACTERS: - test_characters(); - break; - case TEST_SLOW_UPDATE: - test_slow_update(); - break; - case TEST_ALL_ON: - oled_write_raw_P(fill_ff, sizeof(fill_ff)); - break; - case TEST_FRAME: - test_frame(); - break; - case TEST_ALL_OFF: - // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous - // content of the buffer and always marks the whole buffer as dirty. - if (update_speed_test) { - oled_clear(); - } else { - test_fill(0x00, 0x00, 1); - } - break; - case TEST_FILL_HORZ_0: - test_fill(0x55, 0x55, 1); - break; - case TEST_FILL_HORZ_1: - test_fill(0xaa, 0xaa, 1); - break; - case TEST_FILL_VERT_0: - test_fill(0xff, 0x00, 1); - break; - case TEST_FILL_VERT_1: - test_fill(0x00, 0xff, 1); - break; - case TEST_FILL_CHECKERBOARD_1: - test_fill(0x55, 0xaa, 1); - break; - case TEST_FILL_CHECKERBOARD_2: - test_fill(0x33, 0xcc, 2); - break; - case TEST_FILL_CHECKERBOARD_4: - test_fill(0x0f, 0xf0, 4); - break; - - case TEST_DRAW_ALWAYS_ON: - oled_write_P(PSTR("Draw Always"), false); - break; - case TEST_DRAW_ALWAYS_OFF: - oled_write_P(PSTR("Draw Once"), false); - break; - } - return false; -} -/* -------------------------------------------------------------------*/ -/* end OLED test */ - -user_config_t user_config; - -/* RGB Test */ -#ifdef RGBLIGHT_ENABLE -// Light LEDs 0 red when caps lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 -); - -// Light LEDs 1 red when num lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 -); - -const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - indicators_off_layer, - my_capslock_layer, - my_numlock_layer -); - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(1, led_state.caps_lock); - rgblight_set_layer_state(2, led_state.num_lock); - return true; -} - -/* end RGB Test */ - -void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom_cyan(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - - // // Enable the LED layers - // rgblight_layers = my_rgb_layers; - // rgblight_set_layer_state(0, 1); - // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - // rgblight_set_effect_range(2, 6); - - // rgblight_enable(); - // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case : - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk deleted file mode 100644 index a40474b4d5c7..000000000000 --- a/keyboards/uncertainty/keymaps/test/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h deleted file mode 100644 index ade817c14d78..000000000000 --- a/keyboards/uncertainty/test/config.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* WS2812 driver config specifically for STM32F401 */ - -// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B1 - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 - - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF -#endif - -#define DEBUG_EEPROM_OUTPUT - -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 - -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -/* eeprom i2c driver config */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 -#define EXTERNAL_EEPROM_BYTE_COUNT 4096 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_WRITE_TIME 10 -//#define EEPROM_I2C_24LC32 - -/* OLED config */ -#ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 -#define OLED_UPDATE_INTERVAL 100 -#define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - -#endif - -/* encoder config */ -// #define ENCODERS_PAD_A { B12 } -// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h deleted file mode 100644 index dfc6a7bdd4dd..000000000000 --- a/keyboards/uncertainty/test/halconf.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - - -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif - -#undef HAL_USE_I2C -#define HAL_USE_I2C TRUE - - -#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json deleted file mode 100644 index 50695e5af536..000000000000 --- a/keyboards/uncertainty/test/info.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", - "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": true, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], - "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] - }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } - ] - }, - "rgblight": { - "led_count": 14, - "pin": "B1", - "sleep": true, - "max_brightness": 100, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, - "animations": { - "all": true, - "knight": true, - "rainbow_mood": true, - "rgb_test": true - } - }, - - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} - ] - } - } -} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h deleted file mode 100644 index 53d967f53473..000000000000 --- a/keyboards/uncertainty/test/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include_next - -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk deleted file mode 100644 index cbaaf52ddd1a..000000000000 --- a/keyboards/uncertainty/test/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm - -# using external i2c eeprom -EEPROM_DRIVER = i2c - -# using SSD1306 OLED driver -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled - -# using rotary encoder -# ENCODER_ENABLE = yes From c342efa876bbc764c6e304482c524fac0e4c1c15 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:02:33 +0700 Subject: [PATCH 10/46] v0.1: change directory --- keyboards/{ => vinhcatba}/uncertainty/config.h | 0 keyboards/{ => vinhcatba}/uncertainty/halconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/info.json | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk | 0 keyboards/{ => vinhcatba}/uncertainty/kipythonlog | 0 keyboards/{ => vinhcatba}/uncertainty/mcuconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/placefp.py | 0 keyboards/{ => vinhcatba}/uncertainty/readme.md | 0 keyboards/{ => vinhcatba}/uncertainty/rules.mk | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/{ => vinhcatba}/uncertainty/config.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/halconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/info.json (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk (100%) rename keyboards/{ => vinhcatba}/uncertainty/kipythonlog (100%) rename keyboards/{ => vinhcatba}/uncertainty/mcuconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/placefp.py (100%) rename keyboards/{ => vinhcatba}/uncertainty/readme.md (100%) rename keyboards/{ => vinhcatba}/uncertainty/rules.mk (100%) diff --git a/keyboards/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h similarity index 100% rename from keyboards/uncertainty/config.h rename to keyboards/vinhcatba/uncertainty/config.h diff --git a/keyboards/uncertainty/halconf.h b/keyboards/vinhcatba/uncertainty/halconf.h similarity index 100% rename from keyboards/uncertainty/halconf.h rename to keyboards/vinhcatba/uncertainty/halconf.h diff --git a/keyboards/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json similarity index 100% rename from keyboards/uncertainty/info.json rename to keyboards/vinhcatba/uncertainty/info.json diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h similarity index 100% rename from keyboards/uncertainty/keymaps/default/bongo.h rename to keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c similarity index 100% rename from keyboards/uncertainty/keymaps/default/keymap.c rename to keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk similarity index 100% rename from keyboards/uncertainty/keymaps/default/rules.mk rename to keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog similarity index 100% rename from keyboards/uncertainty/kipythonlog rename to keyboards/vinhcatba/uncertainty/kipythonlog diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/vinhcatba/uncertainty/mcuconf.h similarity index 100% rename from keyboards/uncertainty/mcuconf.h rename to keyboards/vinhcatba/uncertainty/mcuconf.h diff --git a/keyboards/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py similarity index 100% rename from keyboards/uncertainty/placefp.py rename to keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md similarity index 100% rename from keyboards/uncertainty/readme.md rename to keyboards/vinhcatba/uncertainty/readme.md diff --git a/keyboards/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk similarity index 100% rename from keyboards/uncertainty/rules.mk rename to keyboards/vinhcatba/uncertainty/rules.mk From 5046bc452f9af8c42fe0bbb61e49e1d5af288213 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:04:02 +0700 Subject: [PATCH 11/46] v0.1: cleanup --- keyboards/vinhcatba/uncertainty/kipythonlog | 1667 ------------------- keyboards/vinhcatba/uncertainty/placefp.py | 55 - 2 files changed, 1722 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/kipythonlog delete mode 100644 keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/vinhcatba/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog deleted file mode 100644 index 7883889b77ec..000000000000 --- a/keyboards/vinhcatba/uncertainty/kipythonlog +++ /dev/null @@ -1,1667 +0,0 @@ -Py 0.9.8 -Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 -Type "help", "copyright", "credits" or "license" for more information. -Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py - -import pcbnew -pcbnew.GetBoard() - > -myboard = pcbnew.GetBoard() -for fp in myboard.GetFootprints(): - print(fp.GetReference()) - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -footprints = myboard.GetFootprints() -printf(footprints[0]) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'printf' is not defined -print(footprints[0]) -::value_type' at 0x00000218643C36F0> > -print(footprints[0].GetReference()) -D88 -print(footprints[0].fp_id) -Traceback (most recent call last): - File "", line 1, in -AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' -selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] -print(selected) -['D15'] -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) -... - File "", line 5 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - fi -... - File "", line 6 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - - -Traceback (most recent call last): - File "", line 2, in -AttributeError: 'FOOTPRINT' object has no attribute 'ref' -for fp in footprints: - try: - sheet_file = fp.GetProperty('Sheetfile') - # construct a list of all the footprints - mod_named_tuple = Footprint(fp=fp, - fp_id=self.get_footprint_id(fp), - sheet_id=self.get_sheet_path(fp)[0], - filename=self.get_sheet_path(fp)[1], - ref=fp.GetReference()) - self.footprints.append(mod_named_tuple) - except KeyError: - pass - pass - File "", line 13 - pass - ^ -IndentationError: unindent does not match any outer indentation level -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - File "", line 1 - fp_list = [] - ^ -SyntaxError: multiple statements found while compiling a single statement -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass -pass - File "", line 7 - pass - ^ -SyntaxError: invalid syntax -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass - - -Traceback (most recent call last): - File "", line 3, in -NameError: name 'Footprint' is not defined -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'fp_id' is not defined -fp_id = "" -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -print(selected) -['D15'] -selected -['D15'] -selected[0] -'D15' -for fp in footprints: - if fp.GetReference() == selected[0]: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D15 -print(fp_id) -D51D642D-4C52-4D3C-BA63-D62449DDB306 -def get_fp_id(fp): - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - else: - fp_id = None - return fp_id - - -for fp in footprints: - if get_fp_id(fp) == fp_id: - print(fp.GetReference()) - - - -D15 -def get_fp_diode(footprints): - diode_list = [] - - - -diode_list = [] -for fp in footprints: - ref = fp.GetReference() - if ref[0] == 'D': - diode_list.append(fp) - - -print(diode_list) -[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort - -diode_list.sort() -for fp in diode_list print(fp.GetReference()) - File "", line 1 - for fp in diode_list print(fp.GetReference()) - ^ -SyntaxError: invalid syntax -for fp in diode_list: print(fp.GetReference()) - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort() -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -def sortByRef(e): - return e.GetReference() - - -diode_list.sort(key=sortByRef) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D10 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D11 -D110 -D111 -D112 -D113 -D114 -D115 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D2 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D3 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D4 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D5 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D6 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D7 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D8 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D9 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -def sortByRefNew(e): - ref = e.GetReference() - return int(ref[1:]) - - -diode_list.sort(key=sortByRefNew) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D110 -D111 -D112 -D113 -D114 -D115 -def fp_set_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.SetBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.SetBrightened() - - - - -for i in range(diode_list): - fp_set_highlight(diode_list[i]) - i = i + 17 - - -Traceback (most recent call last): - File "", line 1, in -TypeError: 'list' object cannot be interpreted as an integer -for col in range(0,105): - fp_set_highlight(diode_list[col]) - col = col + 17 - - -pcbnew.Refresh() -for col in range(0,105): - print(diode_list[col].GetReference()) - col = col + 17 - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -for i in range(0,105,17): - print(diode_list[i].GetReference()) - - -D1 -D18 -D35 -D52 -D69 -D86 -D103 -for i in range(0,105,18): - print(diode_list[i].GetReference()) - . - - File "", line 3 - . - ^ -SyntaxError: invalid syntax -for i in range(0,105,18): - print(diode_list[i].GetReference()) - - -D1 -D19 -D37 -D55 -D73 -D91 -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def fp_clear_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.ClearBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.ClearBrightened() - -for fp in diode_list: - fp_clear_highlight(fp) - -pcbnew.Refresh() -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -fp_to_place = [] -for i in range(0,105,18): - fp_to_place.append(diode_list[i]) - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in -TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'list' object has no attribute 'GetPosition' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 17, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 20, in place_linear -NameError: name 'SCALE' is not defined -SCALE = 1000000.0 -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 24, in place_linear -ZeroDivisionError: integer division or modulo by zero -place_linear(fp_to_place, 3, 0, 1, 0) -pcbnew.Refresh() diff --git a/keyboards/vinhcatba/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py deleted file mode 100644 index dc5954624e4c..000000000000 --- a/keyboards/vinhcatba/uncertainty/placefp.py +++ /dev/null @@ -1,55 +0,0 @@ -import pcbnew - -SCALE = 1000000.0 -board = pcbnew.GetBoard() - -def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - #ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = -1 #footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): - #row = len(footprints_to_place) / col - - #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] - #first row - place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) - for i in range(col): - place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) - pcbnew.Refresh() - -def get_selected(): - #get list of selected fp - selected = [x for x in board.GetFootprints() if x.IsSelected()] - return selected - #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) -def sort_by_ref(fpList, reversed=False): - str = fpList[0].GetReference() - for i, char in enumerate(str): - # Checking if char is numeric - if char.isdigit(): - index = i - break - fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) - return fpList From a816f705fa0f743fe7fcfb62b262ebdf359fcf5f Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:22:40 +0700 Subject: [PATCH 12/46] v0.2: update layers --- .../vinhcatba/uncertainty/keymaps/default/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 141dea017066..aa6fc3e01e48 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -42,24 +42,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, - RGB_MOD, 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_P4, KC_P5, KC_P6, + KC_CALC, 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_P4, KC_P5, KC_P6, C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif From e2f0f897543c4369bb8694f79e8ecfeb2e37b90a Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:26:40 +0700 Subject: [PATCH 13/46] v0.3: add VIA support --- keyboards/vinhcatba/uncertainty/info.json | 2 +- .../uncertainty/keymaps/default/keymap.c | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index a2e643068e17..7364a9bbc422 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -25,7 +25,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0x564C" }, "encoder": { "rotary": [ diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index aa6fc3e01e48..06bafdb4541a 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -47,19 +47,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; #endif From 3d94ae1c000fafead16d73f2223965dfd1184f1d Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:28:18 +0700 Subject: [PATCH 14/46] v0.3: add VIA support (continue) --- .../vinhcatba/uncertainty/keymaps/via/bongo.h | 514 ++++++++++++++++++ .../uncertainty/keymaps/via/keymap.c | 186 +++++++ .../uncertainty/keymaps/via/rules.mk | 5 + 3 files changed, 705 insertions(+) create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c new file mode 100644 index 000000000000..06bafdb4541a --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -0,0 +1,186 @@ +#include "keycodes.h" +#include QMK_KEYBOARD_H + + +#include "print.h" +#include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + +char wpm_str[10]; + +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CALC, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 12); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_MOD: + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE + +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen +bool oled_task_user(void) { + draw_bongo(true); + return false; +} +#endif diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk new file mode 100644 index 000000000000..c4731c6cab8c --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes From e06da4763871943e555a3daac07eebc34e1039a9 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Mon, 29 May 2023 17:14:19 +0700 Subject: [PATCH 15/46] v0.3: change keyboard name, remove eeprom config save in VIA keymap --- keyboards/vinhcatba/uncertainty/info.json | 14 +++-- .../uncertainty/keymaps/via/keymap.c | 62 +------------------ 2 files changed, 11 insertions(+), 65 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 7364a9bbc422..a2af3f3c8db8 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -1,6 +1,6 @@ { - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", + "manufacturer": "Vinh Le", + "keyboard_name": "vinhcatba Uncertainty", "maintainer": "vinhcatba", "processor": "STM32F401", "bootloader": "stm32-dfu", @@ -43,10 +43,16 @@ "override_rgb": true }, "animations": { - "all": true, + "alternating": true, + "breathing": true, + "christmas": true, "knight": true, "rainbow_mood": true, - "rgb_test": true + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true } }, diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 06bafdb4541a..7e490a91bca5 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -12,14 +12,6 @@ char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -user_config_t user_config; /* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -104,7 +96,6 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( my_numlock_layer ); - bool led_update_user(led_t led_state) { rgblight_set_layer_state(1, led_state.caps_lock); rgblight_set_layer_state(2, led_state.num_lock); @@ -118,63 +109,12 @@ void keyboard_post_init_user(void) { // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); - // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); rgblight_set_effect_range(2, 12); rgblight_enable(); - //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_MOD: - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } } +#endif // end RGBLIGHT_ENABLE -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } #ifdef OLED_ENABLE /* TODO: update bongo cat animation */ From 79e8897d17c0b215a603b0bfeef29181930fdf49 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 6 Jun 2023 18:23:27 +0700 Subject: [PATCH 16/46] cleanup for PR --- keyboards/vinhcatba/uncertainty/config.h | 15 +-- keyboards/vinhcatba/uncertainty/info.json | 2 +- .../uncertainty/keymaps/default/bongo.h | 16 +--- .../uncertainty/keymaps/default/keymap.c | 96 +++---------------- .../uncertainty/keymaps/default/rules.mk | 2 - .../vinhcatba/uncertainty/keymaps/via/bongo.h | 16 +--- .../uncertainty/keymaps/via/keymap.c | 33 +++---- .../uncertainty/keymaps/via/rules.mk | 4 +- keyboards/vinhcatba/uncertainty/readme.md | 4 +- keyboards/vinhcatba/uncertainty/rules.mk | 3 +- 10 files changed, 40 insertions(+), 151 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index 79407df65bd2..d28428080622 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -1,4 +1,4 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) +// Copyright 2023 Vinh Le (@vinhcatba) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -23,7 +23,7 @@ // DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM #define WS2812_PWM_DRIVER PWMD3 // TIM3 #define WS2812_PWM_CHANNEL 4 // CH4 @@ -31,13 +31,8 @@ #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF #endif -#define DEBUG_EEPROM_OUTPUT - /* i2c peripheral config */ #define I2C_DRIVER I2CD1 #define I2C1_SCL_PIN B6 @@ -57,12 +52,6 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 #define OLED_UPDATE_INTERVAL 100 #define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - #endif diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index a2af3f3c8db8..57e9542100d7 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -1,6 +1,6 @@ { "manufacturer": "Vinh Le", - "keyboard_name": "vinhcatba Uncertainty", + "keyboard_name": "Uncertainty", "maintainer": "vinhcatba", "processor": "STM32F401", "bootloader": "stm32-dfu", diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h index 442ef5666a76..346377a02e8c 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h @@ -1,3 +1,6 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms #define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 #define IDLE_FRAMES 5 @@ -497,18 +500,5 @@ static void draw_bongo(bool minimal) oled_set_cursor(0, 0); sprintf(wpm, "WPM:%03d", get_current_wpm()); oled_write(wpm, false); - - // // calculate && print clock - // oled_set_cursor(0, 2); - // uint8_t hour = last_minute / 60; - // uint16_t minute = last_minute % 60; - // bool is_pm = (hour / 12) > 0; - // hour = hour % 12; - // if (hour == 0) { - // hour = 12; - // } - // static char time_str[8] = ""; - // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); - // oled_write(time_str, false); } } diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 06bafdb4541a..013343663992 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -1,26 +1,12 @@ -#include "keycodes.h" -#include QMK_KEYBOARD_H - +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "keycodes.h" #include "print.h" #include - -#define BONGO_ENABLE -#ifdef BONGO_ENABLE #include "bongo.h" -#endif -char wpm_str[10]; - -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -user_config_t user_config; -/* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 @@ -79,22 +65,21 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; -#endif +#endif // endif ENCODER_MAP_ENABLE #ifdef RGBLIGHT_ENABLE #define HSV_PASTEL_BLUE 150, 155, 51 -// Light LEDs 0 red when caps lock is active. Hard to ignore! + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 0 ); -// Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 + {0, 2, HSV_OFF} // Turn off 2 LEDs, starting with LED 0 ); // Now define the array of layers. Later layers take precedence @@ -104,7 +89,6 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( my_numlock_layer ); - bool led_update_user(led_t led_state) { rgblight_set_layer_state(1, led_state.caps_lock); rgblight_set_layer_state(2, led_state.num_lock); @@ -112,75 +96,21 @@ bool led_update_user(led_t led_state) { } void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; + // debug_enable=true; + // debug_matrix=true; // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); - // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); rgblight_set_effect_range(2, 12); - rgblight_enable(); - //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - } -#endif +#endif // endif RGBLIGHT_ENABLE -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_MOD: - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } #ifdef OLED_ENABLE - -/* TODO: update bongo cat animation */ // Used to draw on to the oled screen bool oled_task_user(void) { draw_bongo(true); return false; } -#endif +#endif // endif OLED_ENABLE diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk deleted file mode 100644 index c922e471fa86..000000000000 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -ENCODER_MAP_ENABLE = yes -OLED_ENABLE = yes diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h index 442ef5666a76..346377a02e8c 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h @@ -1,3 +1,6 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms #define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 #define IDLE_FRAMES 5 @@ -497,18 +500,5 @@ static void draw_bongo(bool minimal) oled_set_cursor(0, 0); sprintf(wpm, "WPM:%03d", get_current_wpm()); oled_write(wpm, false); - - // // calculate && print clock - // oled_set_cursor(0, 2); - // uint8_t hour = last_minute / 60; - // uint16_t minute = last_minute % 60; - // bool is_pm = (hour / 12) > 0; - // hour = hour % 12; - // if (hour == 0) { - // hour = 12; - // } - // static char time_str[8] = ""; - // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); - // oled_write(time_str, false); } } diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 7e490a91bca5..f2eddf32d573 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -1,18 +1,13 @@ -#include "keycodes.h" -#include QMK_KEYBOARD_H - +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "keycodes.h" #include "print.h" #include - -#define BONGO_ENABLE -#ifdef BONGO_ENABLE #include "bongo.h" -#endif -char wpm_str[10]; -/* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 @@ -71,22 +66,21 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; -#endif +#endif // endif ENCODER_MAP_ENABLE #ifdef RGBLIGHT_ENABLE #define HSV_PASTEL_BLUE 150, 155, 51 -// Light LEDs 0 red when caps lock is active. Hard to ignore! + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 0 ); -// Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 + {0, 2, HSV_OFF} // Turn off 2 LEDs, starting with LED 0 ); // Now define the array of layers. Later layers take precedence @@ -103,21 +97,18 @@ bool led_update_user(led_t led_state) { } void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; + // debug_enable=true; + // debug_matrix=true; // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); rgblight_set_effect_range(2, 12); - rgblight_enable(); } -#endif // end RGBLIGHT_ENABLE +#endif // endif RGBLIGHT_ENABLE #ifdef OLED_ENABLE - -/* TODO: update bongo cat animation */ // Used to draw on to the oled screen bool oled_task_user(void) { draw_bongo(true); diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk index c4731c6cab8c..6a4b39394623 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no -ENCODER_MAP_ENABLE = yes -OLED_ENABLE = yes + + diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index cd3c36958e06..b0e6501f6588 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -4,8 +4,8 @@ *A short description of the keyboard/project* -* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) -* Hardware Supported: *The PCBs, controllers supported* +* Keyboard Maintainer: [Vinh Le](https://github.com/vinhcatba) +* Hardware Supported: *The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill* * Hardware Availability: *Links to where you can find this hardware* Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index 6b7648feb02f..06c99231c997 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -7,4 +7,5 @@ EEPROM_DRIVER = i2c # using SSD1306 OLED driver OLED_ENABLE = yes OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file +WPM_ENABLE = yes # WPM counter for oled +ENCODER_MAP_ENABLE = yes From 48bd8fcab5659d421fa76d6e0dd6adea99397a2d Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 6 Jun 2023 19:50:07 +0700 Subject: [PATCH 17/46] update readme --- keyboards/vinhcatba/uncertainty/readme.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index b0e6501f6588..a577e6a7ff59 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -1,12 +1,12 @@ # uncertainty -![uncertainty](imgur.com image replace me!) +![uncertainty](https://i.imgur.com/IKrn37B.jpeg) *A short description of the keyboard/project* * Keyboard Maintainer: [Vinh Le](https://github.com/vinhcatba) -* Hardware Supported: *The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill* -* Hardware Availability: *Links to where you can find this hardware* +* Hardware Supported: The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill +* Hardware Availability: [Open-source hardware](https://github.com/vinhcatba/uncertainty) Make example for this keyboard (after setting up your build environment): @@ -20,8 +20,7 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Bootloader -Enter the bootloader in 3 ways: +Enter the bootloader in 2 ways: -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available +* **Physical reset button**: On Blackpill board: Hold `NRST` and `BOOT0` -> Release `NRST` first and **quickly** release `BOOT0` right after. +* **Keycode in layout**: Press `FN` + `ESC` From ef05f6d65cdf7044688608caa510efea4312feb7 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Fri, 19 May 2023 16:31:35 +0700 Subject: [PATCH 18/46] vinh: test fw for uncertainty (deprecated) --- keyboards/uncertainty/chconf.h.old | 25 + keyboards/uncertainty/config.h | 69 + keyboards/uncertainty/halconf.h | 13 + keyboards/uncertainty/info.json | 163 ++ .../uncertainty/keymaps/default/keymap.c | 174 ++ .../uncertainty/keymaps/default/keymap.json | 8 + .../uncertainty/keymaps/default/rules.mk | 1 + keyboards/uncertainty/keymaps/test/keymap.c | 588 ++++++ keyboards/uncertainty/keymaps/test/rules.mk | 1 + keyboards/uncertainty/kipythonlog | 1667 +++++++++++++++++ keyboards/uncertainty/mcuconf.h | 10 + keyboards/uncertainty/placefp.py | 55 + keyboards/uncertainty/readme.md | 27 + keyboards/uncertainty/rules.mk | 10 + keyboards/uncertainty/test/config.h | 71 + keyboards/uncertainty/test/halconf.h | 13 + keyboards/uncertainty/test/info.json | 163 ++ keyboards/uncertainty/test/mcuconf.h | 10 + keyboards/uncertainty/test/rules.mk | 13 + 19 files changed, 3081 insertions(+) create mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/config.h create mode 100644 keyboards/uncertainty/halconf.h create mode 100644 keyboards/uncertainty/info.json create mode 100644 keyboards/uncertainty/keymaps/default/keymap.c create mode 100644 keyboards/uncertainty/keymaps/default/keymap.json create mode 100644 keyboards/uncertainty/keymaps/default/rules.mk create mode 100644 keyboards/uncertainty/keymaps/test/keymap.c create mode 100644 keyboards/uncertainty/keymaps/test/rules.mk create mode 100644 keyboards/uncertainty/kipythonlog create mode 100644 keyboards/uncertainty/mcuconf.h create mode 100644 keyboards/uncertainty/placefp.py create mode 100644 keyboards/uncertainty/readme.md create mode 100644 keyboards/uncertainty/rules.mk create mode 100644 keyboards/uncertainty/test/config.h create mode 100644 keyboards/uncertainty/test/halconf.h create mode 100644 keyboards/uncertainty/test/info.json create mode 100644 keyboards/uncertainty/test/mcuconf.h create mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old new file mode 100644 index 000000000000..a6e216133f50 --- /dev/null +++ b/keyboards/uncertainty/chconf.h.old @@ -0,0 +1,25 @@ +#pragma once +// #include_next + +#undef CH_CFG_ST_FREQUENCY +#define CH_CFG_ST_FREQUENCY 10000 + +#undef CH_CFG_FACTORY_OBJECTS_REGISTRY +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#undef CH_CFG_FACTORY_GENERIC_BUFFERS +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#undef CH_CFG_FACTORY_SEMAPHORES +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#undef CH_CFG_FACTORY_MAILBOXES +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#undef CH_CFG_FACTORY_OBJ_FIFOS +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#undef CH_CFG_FACTORY_PIPES +#define CH_CFG_FACTORY_PIPES TRUE +#include_next + diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h new file mode 100644 index 000000000000..9eb0322b7adc --- /dev/null +++ b/keyboards/uncertainty/config.h @@ -0,0 +1,69 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B8 + #define WS2812_PWM_DRIVER PWMD3 // TIM4 + #define WS2812_PWM_CHANNEL 4 // CH3 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + + diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json new file mode 100644 index 000000000000..7e982dcb20c8 --- /dev/null +++ b/keyboards/uncertainty/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 8, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b2b513402f3 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -0,0 +1,174 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 6); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE +// typedef enum { +// OLED_ROTATION_0 = 0, +// OLED_ROTATION_90 = 1, +// OLED_ROTATION_180 = 2, +// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +// } oled_rotation_t; +// oled_rotation_t oled_init_user(oled_rotation_t rotation) { +// return OLED_ROTATION_90; +// } +// bool oled_task_user(void) { +// oled_write_P(PSTR("WPM: "), false); +// oled_write(get_u8_str(get_current_wpm(), '0'), false); +// return false; +// } +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +bool oled_task_user(void) { + //render_logo(); + //oled_set_cursor(1, 1); + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + return false; +} +#endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json new file mode 100644 index 000000000000..127a66c02f3f --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.json @@ -0,0 +1,8 @@ +{ + "keyboard": "uncertainty", + "keymap": "default", + "layers": [ + ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] + ], + "layout": "LAYOUT" +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk new file mode 100644 index 000000000000..3086a27b34f2 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -0,0 +1 @@ +//ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c new file mode 100644 index 000000000000..b4ba6ecd2f2c --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/keymap.c @@ -0,0 +1,588 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +/* Encoder mapping */ +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } +}; +#endif + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; +/* end Keymap */ + +/* OLED test */ +enum tap_dances { + TD_OLED, +}; +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +bool oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return false; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } + return false; +} +/* -------------------------------------------------------------------*/ +/* end OLED test */ + +user_config_t user_config; + +/* RGB Test */ +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +/* end RGB Test */ + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + + // // Enable the LED layers + // rgblight_layers = my_rgb_layers; + // rgblight_set_layer_state(0, 1); + // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + // rgblight_set_effect_range(2, 6); + + // rgblight_enable(); + // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/uncertainty/kipythonlog new file mode 100644 index 000000000000..7883889b77ec --- /dev/null +++ b/keyboards/uncertainty/kipythonlog @@ -0,0 +1,1667 @@ +Py 0.9.8 +Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py + +import pcbnew +pcbnew.GetBoard() + > +myboard = pcbnew.GetBoard() +for fp in myboard.GetFootprints(): + print(fp.GetReference()) + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +footprints = myboard.GetFootprints() +printf(footprints[0]) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'printf' is not defined +print(footprints[0]) +::value_type' at 0x00000218643C36F0> > +print(footprints[0].GetReference()) +D88 +print(footprints[0].fp_id) +Traceback (most recent call last): + File "", line 1, in +AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' +selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] +print(selected) +['D15'] +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) +... + File "", line 5 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + fi +... + File "", line 6 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + + +Traceback (most recent call last): + File "", line 2, in +AttributeError: 'FOOTPRINT' object has no attribute 'ref' +for fp in footprints: + try: + sheet_file = fp.GetProperty('Sheetfile') + # construct a list of all the footprints + mod_named_tuple = Footprint(fp=fp, + fp_id=self.get_footprint_id(fp), + sheet_id=self.get_sheet_path(fp)[0], + filename=self.get_sheet_path(fp)[1], + ref=fp.GetReference()) + self.footprints.append(mod_named_tuple) + except KeyError: + pass + pass + File "", line 13 + pass + ^ +IndentationError: unindent does not match any outer indentation level +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + File "", line 1 + fp_list = [] + ^ +SyntaxError: multiple statements found while compiling a single statement +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass +pass + File "", line 7 + pass + ^ +SyntaxError: invalid syntax +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass + + +Traceback (most recent call last): + File "", line 3, in +NameError: name 'Footprint' is not defined +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'fp_id' is not defined +fp_id = "" +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +print(selected) +['D15'] +selected +['D15'] +selected[0] +'D15' +for fp in footprints: + if fp.GetReference() == selected[0]: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D15 +print(fp_id) +D51D642D-4C52-4D3C-BA63-D62449DDB306 +def get_fp_id(fp): + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + else: + fp_id = None + return fp_id + + +for fp in footprints: + if get_fp_id(fp) == fp_id: + print(fp.GetReference()) + + + +D15 +def get_fp_diode(footprints): + diode_list = [] + + + +diode_list = [] +for fp in footprints: + ref = fp.GetReference() + if ref[0] == 'D': + diode_list.append(fp) + + +print(diode_list) +[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort + +diode_list.sort() +for fp in diode_list print(fp.GetReference()) + File "", line 1 + for fp in diode_list print(fp.GetReference()) + ^ +SyntaxError: invalid syntax +for fp in diode_list: print(fp.GetReference()) + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort() +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +def sortByRef(e): + return e.GetReference() + + +diode_list.sort(key=sortByRef) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D10 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D11 +D110 +D111 +D112 +D113 +D114 +D115 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D2 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D3 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D4 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D5 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D6 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D7 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D8 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D9 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +def sortByRefNew(e): + ref = e.GetReference() + return int(ref[1:]) + + +diode_list.sort(key=sortByRefNew) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D110 +D111 +D112 +D113 +D114 +D115 +def fp_set_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.SetBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.SetBrightened() + + + + +for i in range(diode_list): + fp_set_highlight(diode_list[i]) + i = i + 17 + + +Traceback (most recent call last): + File "", line 1, in +TypeError: 'list' object cannot be interpreted as an integer +for col in range(0,105): + fp_set_highlight(diode_list[col]) + col = col + 17 + + +pcbnew.Refresh() +for col in range(0,105): + print(diode_list[col].GetReference()) + col = col + 17 + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +for i in range(0,105,17): + print(diode_list[i].GetReference()) + + +D1 +D18 +D35 +D52 +D69 +D86 +D103 +for i in range(0,105,18): + print(diode_list[i].GetReference()) + . + + File "", line 3 + . + ^ +SyntaxError: invalid syntax +for i in range(0,105,18): + print(diode_list[i].GetReference()) + + +D1 +D19 +D37 +D55 +D73 +D91 +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def fp_clear_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.ClearBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.ClearBrightened() + +for fp in diode_list: + fp_clear_highlight(fp) + +pcbnew.Refresh() +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +fp_to_place = [] +for i in range(0,105,18): + fp_to_place.append(diode_list[i]) + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in +TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'list' object has no attribute 'GetPosition' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 17, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 20, in place_linear +NameError: name 'SCALE' is not defined +SCALE = 1000000.0 +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 24, in place_linear +ZeroDivisionError: integer division or modulo by zero +place_linear(fp_to_place, 3, 0, 1, 0) +pcbnew.Refresh() diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/uncertainty/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/placefp.py b/keyboards/uncertainty/placefp.py new file mode 100644 index 000000000000..dc5954624e4c --- /dev/null +++ b/keyboards/uncertainty/placefp.py @@ -0,0 +1,55 @@ +import pcbnew + +SCALE = 1000000.0 +board = pcbnew.GetBoard() + +def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + #ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = -1 #footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): + #row = len(footprints_to_place) / col + + #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] + #first row + place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) + for i in range(col): + place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) + pcbnew.Refresh() + +def get_selected(): + #get list of selected fp + selected = [x for x in board.GetFootprints() if x.IsSelected()] + return selected + #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) +def sort_by_ref(fpList, reversed=False): + str = fpList[0].GetReference() + for i, char in enumerate(str): + # Checking if char is numeric + if char.isdigit(): + index = i + break + fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) + return fpList diff --git a/keyboards/uncertainty/readme.md b/keyboards/uncertainty/readme.md new file mode 100644 index 000000000000..cd3c36958e06 --- /dev/null +++ b/keyboards/uncertainty/readme.md @@ -0,0 +1,27 @@ +# uncertainty + +![uncertainty](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make uncertainty:default + +Flashing example for this keyboard: + + make uncertainty:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/uncertainty/rules.mk b/keyboards/uncertainty/rules.mk new file mode 100644 index 000000000000..6b7648feb02f --- /dev/null +++ b/keyboards/uncertainty/rules.mk @@ -0,0 +1,10 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h new file mode 100644 index 000000000000..ade817c14d78 --- /dev/null +++ b/keyboards/uncertainty/test/config.h @@ -0,0 +1,71 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B1 + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + +/* encoder config */ +// #define ENCODERS_PAD_A { B12 } +// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/test/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json new file mode 100644 index 000000000000..50695e5af536 --- /dev/null +++ b/keyboards/uncertainty/test/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 14, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/test/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk new file mode 100644 index 000000000000..cbaaf52ddd1a --- /dev/null +++ b/keyboards/uncertainty/test/rules.mk @@ -0,0 +1,13 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled + +# using rotary encoder +# ENCODER_ENABLE = yes From 0148d4eedceb8a49108928f2ae0572cc55dd3ecf Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 01:55:05 +0700 Subject: [PATCH 19/46] v0.1: update base firmware with 2 layers, use bongo cat animation for oled --- keyboards/uncertainty/chconf.h.old | 25 - keyboards/uncertainty/config.h | 17 +- keyboards/uncertainty/halconf.h | 4 +- keyboards/uncertainty/info.json | 218 +++---- keyboards/uncertainty/keymaps/default/bongo.h | 514 +++++++++++++++ .../uncertainty/keymaps/default/keymap.c | 80 ++- .../uncertainty/keymaps/default/keymap.json | 8 - .../uncertainty/keymaps/default/rules.mk | 3 +- keyboards/uncertainty/keymaps/test/keymap.c | 588 ------------------ keyboards/uncertainty/keymaps/test/rules.mk | 1 - keyboards/uncertainty/test/config.h | 71 --- keyboards/uncertainty/test/halconf.h | 13 - keyboards/uncertainty/test/info.json | 163 ----- keyboards/uncertainty/test/mcuconf.h | 10 - keyboards/uncertainty/test/rules.mk | 13 - 15 files changed, 671 insertions(+), 1057 deletions(-) delete mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/keymaps/default/bongo.h delete mode 100644 keyboards/uncertainty/keymaps/default/keymap.json delete mode 100644 keyboards/uncertainty/keymaps/test/keymap.c delete mode 100644 keyboards/uncertainty/keymaps/test/rules.mk delete mode 100644 keyboards/uncertainty/test/config.h delete mode 100644 keyboards/uncertainty/test/halconf.h delete mode 100644 keyboards/uncertainty/test/info.json delete mode 100644 keyboards/uncertainty/test/mcuconf.h delete mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old deleted file mode 100644 index a6e216133f50..000000000000 --- a/keyboards/uncertainty/chconf.h.old +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -// #include_next - -#undef CH_CFG_ST_FREQUENCY -#define CH_CFG_ST_FREQUENCY 10000 - -#undef CH_CFG_FACTORY_OBJECTS_REGISTRY -#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE - -#undef CH_CFG_FACTORY_GENERIC_BUFFERS -#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE - -#undef CH_CFG_FACTORY_SEMAPHORES -#define CH_CFG_FACTORY_SEMAPHORES TRUE - -#undef CH_CFG_FACTORY_MAILBOXES -#define CH_CFG_FACTORY_MAILBOXES TRUE - -#undef CH_CFG_FACTORY_OBJ_FIFOS -#define CH_CFG_FACTORY_OBJ_FIFOS TRUE - -#undef CH_CFG_FACTORY_PIPES -#define CH_CFG_FACTORY_PIPES TRUE -#include_next - diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h index 9eb0322b7adc..79407df65bd2 100644 --- a/keyboards/uncertainty/config.h +++ b/keyboards/uncertainty/config.h @@ -21,15 +21,16 @@ /* WS2812 driver config specifically for STM32F401 */ -// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B8 - #define WS2812_PWM_DRIVER PWMD3 // TIM4 - #define WS2812_PWM_CHANNEL 4 // CH3 + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 #define WS2812_PWM_PAL_MODE 2 // AF2 - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) // #define RGBLIGHT_LAYERS // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF @@ -56,7 +57,7 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 +// #define OLED_IC OLED_IC_SH1106 // #define OLED_COLUMN_OFFSET 2 // #define OLED_DISPLAY_128X64 @@ -65,5 +66,3 @@ //#define OLED_DISPLAY_ADDRESS 0x3C #endif - - diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h index dfc6a7bdd4dd..84921df44339 100644 --- a/keyboards/uncertainty/halconf.h +++ b/keyboards/uncertainty/halconf.h @@ -1,6 +1,5 @@ #pragma once - #ifdef RGBLIGHT_ENABLE #undef HAL_USE_PWM #define HAL_USE_PWM TRUE @@ -9,5 +8,4 @@ #undef HAL_USE_I2C #define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file +#include_next diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json index 7e982dcb20c8..a2e643068e17 100644 --- a/keyboards/uncertainty/info.json +++ b/keyboards/uncertainty/info.json @@ -21,7 +21,7 @@ "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] }, - "url": "", + "url": "", "usb": { "device_version": "1.0.0", "pid": "0x0000", @@ -29,14 +29,14 @@ }, "encoder": { "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } + { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } ] }, "rgblight": { - "led_count": 8, + "led_count": 14, "pin": "B1", "sleep": true, - "max_brightness": 100, + "max_brightness": 255, "brightness_steps": 10, "layers": { "enabled": true, @@ -53,111 +53,111 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, + {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, + {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, + {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, + {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, + {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, + {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, + {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, + {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, + {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, + {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, + {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, + {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, + {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, + {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, + {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, + {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, + {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, + {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, + {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, + {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, + {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, + {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, + {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, + {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, + {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, + {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, + {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, + {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, + {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, + {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, + {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, + {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, + {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, + {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, + {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, + {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, + {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, + {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, + {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, + {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, + {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, + {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, + {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, + {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, + {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, + {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, + {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, + {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, + {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, + {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, + {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, + {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, + {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, + {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, + {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, + {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, + {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, + {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, + {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, + {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, + {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, + {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, + {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, + {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, + {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, + {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, + {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, + {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, + {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, + {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, + {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, + {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, + {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, + {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, + {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, + {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, + {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, + {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, + {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, + {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, + {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, + {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, + {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, + {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, + {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, + {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, + {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, + {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, + {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, + {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, + {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, + {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, + {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, + {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, + {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, + {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, + {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, + {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, + {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, + {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, + {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, + {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, + {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} ] } } -} \ No newline at end of file +} diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/uncertainty/keymaps/default/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c index 3b2b513402f3..141dea017066 100644 --- a/keyboards/uncertainty/keymaps/default/keymap.c +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -1,9 +1,17 @@ +#include "keycodes.h" #include QMK_KEYBOARD_H #include "print.h" #include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + char wpm_str[10]; + typedef union { uint32_t raw; struct { @@ -12,8 +20,8 @@ typedef union { } user_config_t; user_config_t user_config; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ @@ -27,34 +35,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + RGB_MOD, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#if defined(ENCODER_MAP_ENABLE) +#ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } }; #endif #ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 // Light LEDs 0 red when caps lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 ); // Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( @@ -83,8 +101,8 @@ void keyboard_post_init_user(void) { rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - rgblight_set_effect_range(2, 6); - + rgblight_set_effect_range(2, 12); + rgblight_enable(); //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); @@ -93,7 +111,7 @@ void keyboard_post_init_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case : + case RGB_MOD: if (record->event.pressed) { // Do something when pressed } else { @@ -140,35 +158,11 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! // } #ifdef OLED_ENABLE -// typedef enum { -// OLED_ROTATION_0 = 0, -// OLED_ROTATION_90 = 1, -// OLED_ROTATION_180 = 2, -// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 -// } oled_rotation_t; -// oled_rotation_t oled_init_user(oled_rotation_t rotation) { -// return OLED_ROTATION_90; -// } -// bool oled_task_user(void) { -// oled_write_P(PSTR("WPM: "), false); -// oled_write(get_u8_str(get_current_wpm(), '0'), false); -// return false; -// } -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 - }; - - oled_write_P(qmk_logo, false); -} +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen bool oled_task_user(void) { - //render_logo(); - //oled_set_cursor(1, 1); - oled_write_P(PSTR("WPM: "), false); - oled_write(get_u8_str(get_current_wpm(), '0'), false); + draw_bongo(true); return false; } #endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json deleted file mode 100644 index 127a66c02f3f..000000000000 --- a/keyboards/uncertainty/keymaps/default/keymap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "keyboard": "uncertainty", - "keymap": "default", - "layers": [ - ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] - ], - "layout": "LAYOUT" -} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk index 3086a27b34f2..c922e471fa86 100644 --- a/keyboards/uncertainty/keymaps/default/rules.mk +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -1 +1,2 @@ -//ENCODER_MAP_ENABLE = yes \ No newline at end of file +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c deleted file mode 100644 index b4ba6ecd2f2c..000000000000 --- a/keyboards/uncertainty/keymaps/test/keymap.c +++ /dev/null @@ -1,588 +0,0 @@ -#include QMK_KEYBOARD_H - - -#include "print.h" -#include -char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -/* Encoder mapping */ -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } -}; -#endif - -/* Keymap */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* 0 - * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ - * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ - * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ - * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | - * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | - * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ - * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ - * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ - * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - */ - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; -/* end Keymap */ - -/* OLED test */ -enum tap_dances { - TD_OLED, -}; -enum oled_test_modes { - // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. - TEST_FIRST, - TEST_LOGO = TEST_FIRST, - TEST_CHARACTERS, - TEST_SLOW_UPDATE, - TEST_ALL_ON, - TEST_FRAME, - TEST_ALL_OFF, - TEST_FILL_HORZ_0, - TEST_FILL_HORZ_1, - TEST_FILL_VERT_0, - TEST_FILL_VERT_1, - TEST_FILL_CHECKERBOARD_1, - TEST_FILL_CHECKERBOARD_2, - TEST_FILL_CHECKERBOARD_4, - TEST_LAST = TEST_FILL_CHECKERBOARD_4, - - // Special modes which are not reachable normally. - TEST_DRAW_ALWAYS_ON, - TEST_DRAW_ALWAYS_OFF, -}; - -static enum oled_test_modes test_mode = TEST_FIRST; - -static oled_rotation_t rotation = OLED_ROTATION_0; - -static bool scrolling; -static uint8_t scrolling_speed; -static bool need_update = true; -static bool draw_always; -static bool update_speed_test; -static uint32_t update_speed_start_timer; -static uint16_t update_speed_count; -static bool restart_test; - -static void stop_scrolling(void) { - if (scrolling) { - oled_scroll_off(); - scrolling = false; - } -} - -static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - // single hold - step through rotations - switch (rotation) { - case OLED_ROTATION_0: - rotation = OLED_ROTATION_90; - break; - case OLED_ROTATION_90: - rotation = OLED_ROTATION_180; - break; - case OLED_ROTATION_180: - rotation = OLED_ROTATION_270; - break; - default: - rotation = OLED_ROTATION_0; - break; - } - stop_scrolling(); - oled_init(rotation); - } else { - // single tap - step through test modes - if (test_mode < TEST_LAST) { - ++test_mode; - } else { - test_mode = TEST_FIRST; - } - stop_scrolling(); - oled_clear(); - } - restart_test = true; - need_update = true; - break; - - case 2: - if (state->pressed) { - // tap + hold - change scrolling speed - scrolling_speed = (scrolling_speed + 1) % 8; - stop_scrolling(); - oled_scroll_set_speed(scrolling_speed); - // Cannot reactivate scrolling here, because oled_scroll_off() - // marks the whole display as dirty, and oled_scroll_left() - // silently does nothing if either the display is dirty or - // scrolling is already active. - } else { - // double tap - toggle scrolling - if (!scrolling) { - scrolling = true; - oled_scroll_left(); - } else { - scrolling = false; - oled_scroll_off(); - } - } - need_update = true; - break; - - case 3: - if (state->pressed) { - // double tap + hold - toggle `draw_always` - draw_always = !draw_always; - if (draw_always) { - test_mode = TEST_DRAW_ALWAYS_ON; - } else { - test_mode = TEST_DRAW_ALWAYS_OFF; - } - stop_scrolling(); - oled_clear(); - restart_test = true; - need_update = true; - } else { - // triple tap - toggle update speed test - update_speed_test = !update_speed_test; - if (update_speed_test) { - stop_scrolling(); - update_speed_start_timer = timer_read32(); - update_speed_count = 0; - } - } - break; - case 4: - if (!state->pressed) { - // quadruple tap - step through brightness levels - oled_set_brightness(oled_get_brightness() + 0x10); - } - break; - default: - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; - -// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; - -// `bool oled_is_dirty(void)` does not exist at the moment -extern OLED_BLOCK_TYPE oled_dirty; - -static inline uint8_t pixel_width(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH; - } - return OLED_DISPLAY_HEIGHT; -} - -static inline uint8_t pixel_height(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT; - } - return OLED_DISPLAY_WIDTH; -} - -// Draw the QMK logo at the top left corner, clipping if it does not fit. -static void test_logo(void) { - uint8_t lines = oled_max_lines(); - if (lines > 3) { - lines = 3; - } - uint8_t chars = oled_max_chars(); - if (chars > 21) { - chars = 21; - } - for (uint8_t row = 0; row < lines; ++row) { - oled_set_cursor(0, row); - for (uint8_t col = 0; col < chars; ++col) { - oled_write_char(0x80 + 0x20 * row + col, false); - } - } -} - -static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; - -// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. -static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { - uint8_t width = pixel_width(); - uint8_t lines = oled_max_lines(); - uint16_t index = 0; - for (uint8_t row = 0; row < lines; ++row) { - for (uint8_t col = 0; col < width; ++col) { - uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; - oled_write_raw_byte(byte, index++); - } - } -} - -// Draw a frame at the edges of the OLED screen. -static void test_frame(void) { - uint8_t width = pixel_width(); - uint8_t height = pixel_height(); - for (uint8_t x = 0; x < width; ++x) { - oled_write_pixel(x, 0, true); - oled_write_pixel(x, height - 1, true); - } - for (uint8_t y = 1; y < height - 1; ++y) { - oled_write_pixel(0, y, true); - oled_write_pixel(width - 1, y, true); - } -} - -// Use all 94 visible ASCII characters for testing. -#define TEST_CHAR_COUNT ('~' - '!' + 1) - -static char get_test_char(uint8_t char_index) { return char_index + '!'; } - -// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters -// at once, the sequence is repeated the second time with inverted characters). -static void test_characters(void) { - uint8_t cols = oled_max_chars(); - uint8_t rows = oled_max_lines(); - bool invert = false; - uint8_t char_index = 0; - for (uint8_t row = 0; row < rows; ++row) { - for (uint8_t col = 0; col < cols; ++col) { - oled_write_char(get_test_char(char_index), invert); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - invert = !invert; - } - } - } -} - -// Test screen updating after drawing a single character or pixel. -void test_slow_update(void) { - static uint8_t phase, x, y, char_index, first_char; - static uint16_t timer; - static uint16_t delay = 500; - - if (restart_test) { - // Initialize all state variables before starting the test. - restart_test = false; - phase = 0; - x = 0; - y = 0; - char_index = 0; - first_char = 0; - delay = 500; - } else { - // Wait for the specified time between steps. - if (timer_elapsed(timer) < delay) { - return; - } - } - - timer = timer_read(); - switch (phase) { - case 0: - // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the - // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be - // overlapped by the inverted character background. - oled_set_cursor(x, y); - oled_write_char(get_test_char(char_index), false); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - } - if (++x >= oled_max_chars()) { - x = 0; - if (++y >= oled_max_lines()) { - // The whole screen was filled - start the next phase. - ++phase; - x = y = 0; - } - } - delay = 250; - break; - - case 1: - // Phase 1: draw a line along the left edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y < pixel_height() - 1) { - ++y; - } else { - // The bottom left corner is reached - start the next phase. - ++phase; - ++x; - } - delay = 50; - break; - - case 2: - // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x < pixel_width() - 1) { - ++x; - } else { - // The bottom right corner was reached - start the next phase. - ++phase; - --y; - } - delay = 50; - break; - - case 3: - // Phase 3: draw a line along the right edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y > 0) { - --y; - } else { - // The top right corner was reached - start the next phase. - ++phase; - --x; - } - delay = 50; - break; - - case 4: - // Phase 4: draw a line along the top edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x > 0) { - --x; - } else { - // The top left corner was reached - start the next phase. - ++phase; - } - delay = 50; - break; - - default: - // Restart from phase 0, but change the first character of the sequence to make screen updates visible. - if (++first_char >= TEST_CHAR_COUNT) { - first_char = 0; - } - phase = 0; - x = 0; - y = 0; - char_index = first_char; - delay = 500; - break; - } -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - oled_scroll_set_area(0, 0); - oled_scroll_set_speed(scrolling_speed); - return rotation; -} - -bool oled_task_user(void) { - if (update_speed_test) { - // Speed test mode - wait for screen update completion. - if (!oled_dirty) { - // Update statistics and send the measurement result to the console. - update_speed_count++; - if (update_speed_count % 256 == 0) { - uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); - } - - // Toggle between the "all on" and "all off" states and trigger the screen update again. - if (test_mode == TEST_ALL_ON) { - test_mode = TEST_ALL_OFF; - } else { - test_mode = TEST_ALL_ON; - } - need_update = true; - } - } - - // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on - // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty - // bits only when something has actually changed. However, redrawing the image only when some of the underlying - // data has changed is more efficient. Make it possible to test both modes here. - if (!draw_always || update_speed_test) { - // Draw the image only when the `need_update` flag is set, except for the "slow update" test. - // This mode is also forced when the screen update speed test is performed. - if (!need_update) { - if (test_mode != TEST_SLOW_UPDATE) { - return false; - } - } - need_update = false; - } - - switch (test_mode) { - case TEST_LOGO: - test_logo(); - break; - case TEST_CHARACTERS: - test_characters(); - break; - case TEST_SLOW_UPDATE: - test_slow_update(); - break; - case TEST_ALL_ON: - oled_write_raw_P(fill_ff, sizeof(fill_ff)); - break; - case TEST_FRAME: - test_frame(); - break; - case TEST_ALL_OFF: - // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous - // content of the buffer and always marks the whole buffer as dirty. - if (update_speed_test) { - oled_clear(); - } else { - test_fill(0x00, 0x00, 1); - } - break; - case TEST_FILL_HORZ_0: - test_fill(0x55, 0x55, 1); - break; - case TEST_FILL_HORZ_1: - test_fill(0xaa, 0xaa, 1); - break; - case TEST_FILL_VERT_0: - test_fill(0xff, 0x00, 1); - break; - case TEST_FILL_VERT_1: - test_fill(0x00, 0xff, 1); - break; - case TEST_FILL_CHECKERBOARD_1: - test_fill(0x55, 0xaa, 1); - break; - case TEST_FILL_CHECKERBOARD_2: - test_fill(0x33, 0xcc, 2); - break; - case TEST_FILL_CHECKERBOARD_4: - test_fill(0x0f, 0xf0, 4); - break; - - case TEST_DRAW_ALWAYS_ON: - oled_write_P(PSTR("Draw Always"), false); - break; - case TEST_DRAW_ALWAYS_OFF: - oled_write_P(PSTR("Draw Once"), false); - break; - } - return false; -} -/* -------------------------------------------------------------------*/ -/* end OLED test */ - -user_config_t user_config; - -/* RGB Test */ -#ifdef RGBLIGHT_ENABLE -// Light LEDs 0 red when caps lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 -); - -// Light LEDs 1 red when num lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 -); - -const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - indicators_off_layer, - my_capslock_layer, - my_numlock_layer -); - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(1, led_state.caps_lock); - rgblight_set_layer_state(2, led_state.num_lock); - return true; -} - -/* end RGB Test */ - -void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom_cyan(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - - // // Enable the LED layers - // rgblight_layers = my_rgb_layers; - // rgblight_set_layer_state(0, 1); - // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - // rgblight_set_effect_range(2, 6); - - // rgblight_enable(); - // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case : - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk deleted file mode 100644 index a40474b4d5c7..000000000000 --- a/keyboards/uncertainty/keymaps/test/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h deleted file mode 100644 index ade817c14d78..000000000000 --- a/keyboards/uncertainty/test/config.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* WS2812 driver config specifically for STM32F401 */ - -// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B1 - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 - - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF -#endif - -#define DEBUG_EEPROM_OUTPUT - -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 - -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -/* eeprom i2c driver config */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 -#define EXTERNAL_EEPROM_BYTE_COUNT 4096 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_WRITE_TIME 10 -//#define EEPROM_I2C_24LC32 - -/* OLED config */ -#ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 -#define OLED_UPDATE_INTERVAL 100 -#define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - -#endif - -/* encoder config */ -// #define ENCODERS_PAD_A { B12 } -// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h deleted file mode 100644 index dfc6a7bdd4dd..000000000000 --- a/keyboards/uncertainty/test/halconf.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - - -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif - -#undef HAL_USE_I2C -#define HAL_USE_I2C TRUE - - -#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json deleted file mode 100644 index 50695e5af536..000000000000 --- a/keyboards/uncertainty/test/info.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", - "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": true, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], - "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] - }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } - ] - }, - "rgblight": { - "led_count": 14, - "pin": "B1", - "sleep": true, - "max_brightness": 100, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, - "animations": { - "all": true, - "knight": true, - "rainbow_mood": true, - "rgb_test": true - } - }, - - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} - ] - } - } -} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h deleted file mode 100644 index 53d967f53473..000000000000 --- a/keyboards/uncertainty/test/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include_next - -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk deleted file mode 100644 index cbaaf52ddd1a..000000000000 --- a/keyboards/uncertainty/test/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm - -# using external i2c eeprom -EEPROM_DRIVER = i2c - -# using SSD1306 OLED driver -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled - -# using rotary encoder -# ENCODER_ENABLE = yes From 1b3107616eb4cac10c21dcd384eac160689a813d Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:02:33 +0700 Subject: [PATCH 20/46] v0.1: change directory --- keyboards/{ => vinhcatba}/uncertainty/config.h | 0 keyboards/{ => vinhcatba}/uncertainty/halconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/info.json | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c | 0 keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk | 0 keyboards/{ => vinhcatba}/uncertainty/kipythonlog | 0 keyboards/{ => vinhcatba}/uncertainty/mcuconf.h | 0 keyboards/{ => vinhcatba}/uncertainty/placefp.py | 0 keyboards/{ => vinhcatba}/uncertainty/readme.md | 0 keyboards/{ => vinhcatba}/uncertainty/rules.mk | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/{ => vinhcatba}/uncertainty/config.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/halconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/info.json (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/bongo.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/keymap.c (100%) rename keyboards/{ => vinhcatba}/uncertainty/keymaps/default/rules.mk (100%) rename keyboards/{ => vinhcatba}/uncertainty/kipythonlog (100%) rename keyboards/{ => vinhcatba}/uncertainty/mcuconf.h (100%) rename keyboards/{ => vinhcatba}/uncertainty/placefp.py (100%) rename keyboards/{ => vinhcatba}/uncertainty/readme.md (100%) rename keyboards/{ => vinhcatba}/uncertainty/rules.mk (100%) diff --git a/keyboards/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h similarity index 100% rename from keyboards/uncertainty/config.h rename to keyboards/vinhcatba/uncertainty/config.h diff --git a/keyboards/uncertainty/halconf.h b/keyboards/vinhcatba/uncertainty/halconf.h similarity index 100% rename from keyboards/uncertainty/halconf.h rename to keyboards/vinhcatba/uncertainty/halconf.h diff --git a/keyboards/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json similarity index 100% rename from keyboards/uncertainty/info.json rename to keyboards/vinhcatba/uncertainty/info.json diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h similarity index 100% rename from keyboards/uncertainty/keymaps/default/bongo.h rename to keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c similarity index 100% rename from keyboards/uncertainty/keymaps/default/keymap.c rename to keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk similarity index 100% rename from keyboards/uncertainty/keymaps/default/rules.mk rename to keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog similarity index 100% rename from keyboards/uncertainty/kipythonlog rename to keyboards/vinhcatba/uncertainty/kipythonlog diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/vinhcatba/uncertainty/mcuconf.h similarity index 100% rename from keyboards/uncertainty/mcuconf.h rename to keyboards/vinhcatba/uncertainty/mcuconf.h diff --git a/keyboards/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py similarity index 100% rename from keyboards/uncertainty/placefp.py rename to keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md similarity index 100% rename from keyboards/uncertainty/readme.md rename to keyboards/vinhcatba/uncertainty/readme.md diff --git a/keyboards/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk similarity index 100% rename from keyboards/uncertainty/rules.mk rename to keyboards/vinhcatba/uncertainty/rules.mk From dc377c083f2b3c422b68bcd1f7b424806e165ed2 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:04:02 +0700 Subject: [PATCH 21/46] v0.1: cleanup --- keyboards/vinhcatba/uncertainty/kipythonlog | 1667 ------------------- keyboards/vinhcatba/uncertainty/placefp.py | 55 - 2 files changed, 1722 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/kipythonlog delete mode 100644 keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/vinhcatba/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog deleted file mode 100644 index 7883889b77ec..000000000000 --- a/keyboards/vinhcatba/uncertainty/kipythonlog +++ /dev/null @@ -1,1667 +0,0 @@ -Py 0.9.8 -Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 -Type "help", "copyright", "credits" or "license" for more information. -Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py - -import pcbnew -pcbnew.GetBoard() - > -myboard = pcbnew.GetBoard() -for fp in myboard.GetFootprints(): - print(fp.GetReference()) - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -footprints = myboard.GetFootprints() -printf(footprints[0]) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'printf' is not defined -print(footprints[0]) -::value_type' at 0x00000218643C36F0> > -print(footprints[0].GetReference()) -D88 -print(footprints[0].fp_id) -Traceback (most recent call last): - File "", line 1, in -AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' -selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] -print(selected) -['D15'] -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) -... - File "", line 5 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - fi -... - File "", line 6 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - - -Traceback (most recent call last): - File "", line 2, in -AttributeError: 'FOOTPRINT' object has no attribute 'ref' -for fp in footprints: - try: - sheet_file = fp.GetProperty('Sheetfile') - # construct a list of all the footprints - mod_named_tuple = Footprint(fp=fp, - fp_id=self.get_footprint_id(fp), - sheet_id=self.get_sheet_path(fp)[0], - filename=self.get_sheet_path(fp)[1], - ref=fp.GetReference()) - self.footprints.append(mod_named_tuple) - except KeyError: - pass - pass - File "", line 13 - pass - ^ -IndentationError: unindent does not match any outer indentation level -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - File "", line 1 - fp_list = [] - ^ -SyntaxError: multiple statements found while compiling a single statement -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass -pass - File "", line 7 - pass - ^ -SyntaxError: invalid syntax -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass - - -Traceback (most recent call last): - File "", line 3, in -NameError: name 'Footprint' is not defined -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'fp_id' is not defined -fp_id = "" -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -print(selected) -['D15'] -selected -['D15'] -selected[0] -'D15' -for fp in footprints: - if fp.GetReference() == selected[0]: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D15 -print(fp_id) -D51D642D-4C52-4D3C-BA63-D62449DDB306 -def get_fp_id(fp): - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - else: - fp_id = None - return fp_id - - -for fp in footprints: - if get_fp_id(fp) == fp_id: - print(fp.GetReference()) - - - -D15 -def get_fp_diode(footprints): - diode_list = [] - - - -diode_list = [] -for fp in footprints: - ref = fp.GetReference() - if ref[0] == 'D': - diode_list.append(fp) - - -print(diode_list) -[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort - -diode_list.sort() -for fp in diode_list print(fp.GetReference()) - File "", line 1 - for fp in diode_list print(fp.GetReference()) - ^ -SyntaxError: invalid syntax -for fp in diode_list: print(fp.GetReference()) - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort() -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -def sortByRef(e): - return e.GetReference() - - -diode_list.sort(key=sortByRef) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D10 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D11 -D110 -D111 -D112 -D113 -D114 -D115 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D2 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D3 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D4 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D5 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D6 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D7 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D8 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D9 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -def sortByRefNew(e): - ref = e.GetReference() - return int(ref[1:]) - - -diode_list.sort(key=sortByRefNew) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D110 -D111 -D112 -D113 -D114 -D115 -def fp_set_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.SetBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.SetBrightened() - - - - -for i in range(diode_list): - fp_set_highlight(diode_list[i]) - i = i + 17 - - -Traceback (most recent call last): - File "", line 1, in -TypeError: 'list' object cannot be interpreted as an integer -for col in range(0,105): - fp_set_highlight(diode_list[col]) - col = col + 17 - - -pcbnew.Refresh() -for col in range(0,105): - print(diode_list[col].GetReference()) - col = col + 17 - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -for i in range(0,105,17): - print(diode_list[i].GetReference()) - - -D1 -D18 -D35 -D52 -D69 -D86 -D103 -for i in range(0,105,18): - print(diode_list[i].GetReference()) - . - - File "", line 3 - . - ^ -SyntaxError: invalid syntax -for i in range(0,105,18): - print(diode_list[i].GetReference()) - - -D1 -D19 -D37 -D55 -D73 -D91 -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def fp_clear_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.ClearBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.ClearBrightened() - -for fp in diode_list: - fp_clear_highlight(fp) - -pcbnew.Refresh() -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -fp_to_place = [] -for i in range(0,105,18): - fp_to_place.append(diode_list[i]) - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in -TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'list' object has no attribute 'GetPosition' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 17, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 20, in place_linear -NameError: name 'SCALE' is not defined -SCALE = 1000000.0 -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 24, in place_linear -ZeroDivisionError: integer division or modulo by zero -place_linear(fp_to_place, 3, 0, 1, 0) -pcbnew.Refresh() diff --git a/keyboards/vinhcatba/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py deleted file mode 100644 index dc5954624e4c..000000000000 --- a/keyboards/vinhcatba/uncertainty/placefp.py +++ /dev/null @@ -1,55 +0,0 @@ -import pcbnew - -SCALE = 1000000.0 -board = pcbnew.GetBoard() - -def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - #ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = -1 #footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): - #row = len(footprints_to_place) / col - - #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] - #first row - place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) - for i in range(col): - place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) - pcbnew.Refresh() - -def get_selected(): - #get list of selected fp - selected = [x for x in board.GetFootprints() if x.IsSelected()] - return selected - #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) -def sort_by_ref(fpList, reversed=False): - str = fpList[0].GetReference() - for i, char in enumerate(str): - # Checking if char is numeric - if char.isdigit(): - index = i - break - fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) - return fpList From 278a6d7bd95b8344a5c9cab025df00cd12d2b463 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:22:40 +0700 Subject: [PATCH 22/46] v0.2: update layers --- .../vinhcatba/uncertainty/keymaps/default/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 141dea017066..aa6fc3e01e48 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -42,24 +42,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, - RGB_MOD, 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_P4, KC_P5, KC_P6, + KC_CALC, 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_P4, KC_P5, KC_P6, C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif From afd01697ac69c567e382b0ed897975addfa33d72 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:26:40 +0700 Subject: [PATCH 23/46] v0.3: add VIA support --- keyboards/vinhcatba/uncertainty/info.json | 2 +- .../uncertainty/keymaps/default/keymap.c | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index a2e643068e17..7364a9bbc422 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -25,7 +25,7 @@ "usb": { "device_version": "1.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0x564C" }, "encoder": { "rotary": [ diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index aa6fc3e01e48..06bafdb4541a 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -47,19 +47,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; #endif From 4b9c31defcd1b3ebdaccf0628cff2b52505b3925 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 23:28:18 +0700 Subject: [PATCH 24/46] v0.3: add VIA support (continue) --- .../vinhcatba/uncertainty/keymaps/via/bongo.h | 514 ++++++++++++++++++ .../uncertainty/keymaps/via/keymap.c | 186 +++++++ .../uncertainty/keymaps/via/rules.mk | 5 + 3 files changed, 705 insertions(+) create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c new file mode 100644 index 000000000000..06bafdb4541a --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -0,0 +1,186 @@ +#include "keycodes.h" +#include QMK_KEYBOARD_H + + +#include "print.h" +#include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + +char wpm_str[10]; + +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CALC, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, + [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 12); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_MOD: + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE + +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen +bool oled_task_user(void) { + draw_bongo(true); + return false; +} +#endif diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk new file mode 100644 index 000000000000..c4731c6cab8c --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes From 016ed63c2797a50fc7e80e89ced7aea9c61779ae Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Fri, 19 May 2023 16:31:35 +0700 Subject: [PATCH 25/46] vinh: test fw for uncertainty (deprecated) --- keyboards/uncertainty/chconf.h.old | 25 + keyboards/uncertainty/config.h | 69 + keyboards/uncertainty/halconf.h | 13 + keyboards/uncertainty/info.json | 163 ++ .../uncertainty/keymaps/default/keymap.c | 174 ++ .../uncertainty/keymaps/default/keymap.json | 8 + .../uncertainty/keymaps/default/rules.mk | 1 + keyboards/uncertainty/keymaps/test/keymap.c | 588 ++++++ keyboards/uncertainty/keymaps/test/rules.mk | 1 + keyboards/uncertainty/kipythonlog | 1667 +++++++++++++++++ keyboards/uncertainty/mcuconf.h | 10 + keyboards/uncertainty/placefp.py | 55 + keyboards/uncertainty/readme.md | 27 + keyboards/uncertainty/rules.mk | 10 + keyboards/uncertainty/test/config.h | 71 + keyboards/uncertainty/test/halconf.h | 13 + keyboards/uncertainty/test/info.json | 163 ++ keyboards/uncertainty/test/mcuconf.h | 10 + keyboards/uncertainty/test/rules.mk | 13 + 19 files changed, 3081 insertions(+) create mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/config.h create mode 100644 keyboards/uncertainty/halconf.h create mode 100644 keyboards/uncertainty/info.json create mode 100644 keyboards/uncertainty/keymaps/default/keymap.c create mode 100644 keyboards/uncertainty/keymaps/default/keymap.json create mode 100644 keyboards/uncertainty/keymaps/default/rules.mk create mode 100644 keyboards/uncertainty/keymaps/test/keymap.c create mode 100644 keyboards/uncertainty/keymaps/test/rules.mk create mode 100644 keyboards/uncertainty/kipythonlog create mode 100644 keyboards/uncertainty/mcuconf.h create mode 100644 keyboards/uncertainty/placefp.py create mode 100644 keyboards/uncertainty/readme.md create mode 100644 keyboards/uncertainty/rules.mk create mode 100644 keyboards/uncertainty/test/config.h create mode 100644 keyboards/uncertainty/test/halconf.h create mode 100644 keyboards/uncertainty/test/info.json create mode 100644 keyboards/uncertainty/test/mcuconf.h create mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old new file mode 100644 index 000000000000..a6e216133f50 --- /dev/null +++ b/keyboards/uncertainty/chconf.h.old @@ -0,0 +1,25 @@ +#pragma once +// #include_next + +#undef CH_CFG_ST_FREQUENCY +#define CH_CFG_ST_FREQUENCY 10000 + +#undef CH_CFG_FACTORY_OBJECTS_REGISTRY +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#undef CH_CFG_FACTORY_GENERIC_BUFFERS +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#undef CH_CFG_FACTORY_SEMAPHORES +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#undef CH_CFG_FACTORY_MAILBOXES +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#undef CH_CFG_FACTORY_OBJ_FIFOS +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#undef CH_CFG_FACTORY_PIPES +#define CH_CFG_FACTORY_PIPES TRUE +#include_next + diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h new file mode 100644 index 000000000000..9eb0322b7adc --- /dev/null +++ b/keyboards/uncertainty/config.h @@ -0,0 +1,69 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B8 + #define WS2812_PWM_DRIVER PWMD3 // TIM4 + #define WS2812_PWM_CHANNEL 4 // CH3 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + + diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json new file mode 100644 index 000000000000..7e982dcb20c8 --- /dev/null +++ b/keyboards/uncertainty/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 8, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c new file mode 100644 index 000000000000..3b2b513402f3 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -0,0 +1,174 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + + // Enable the LED layers + rgblight_layers = my_rgb_layers; + rgblight_set_layer_state(0, 1); + // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + rgblight_set_effect_range(2, 6); + + rgblight_enable(); + //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } +#ifdef OLED_ENABLE +// typedef enum { +// OLED_ROTATION_0 = 0, +// OLED_ROTATION_90 = 1, +// OLED_ROTATION_180 = 2, +// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +// } oled_rotation_t; +// oled_rotation_t oled_init_user(oled_rotation_t rotation) { +// return OLED_ROTATION_90; +// } +// bool oled_task_user(void) { +// oled_write_P(PSTR("WPM: "), false); +// oled_write(get_u8_str(get_current_wpm(), '0'), false); +// return false; +// } +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +bool oled_task_user(void) { + //render_logo(); + //oled_set_cursor(1, 1); + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + return false; +} +#endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json new file mode 100644 index 000000000000..127a66c02f3f --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/keymap.json @@ -0,0 +1,8 @@ +{ + "keyboard": "uncertainty", + "keymap": "default", + "layers": [ + ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] + ], + "layout": "LAYOUT" +} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk new file mode 100644 index 000000000000..3086a27b34f2 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -0,0 +1 @@ +//ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c new file mode 100644 index 000000000000..b4ba6ecd2f2c --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/keymap.c @@ -0,0 +1,588 @@ +#include QMK_KEYBOARD_H + + +#include "print.h" +#include +char wpm_str[10]; +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +/* Encoder mapping */ +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } +}; +#endif + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0 + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ + * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ + * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ + * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | + * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | + * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ + * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ + * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [0] = LAYOUT( + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_P4, KC_P5, KC_P6, + XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, + XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; +/* end Keymap */ + +/* OLED test */ +enum tap_dances { + TD_OLED, +}; +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +bool oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return false; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } + return false; +} +/* -------------------------------------------------------------------*/ +/* end OLED test */ + +user_config_t user_config; + +/* RGB Test */ +#ifdef RGBLIGHT_ENABLE +// Light LEDs 0 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 +); + +// Light LEDs 1 red when num lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 +); + +const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + indicators_off_layer, + my_capslock_layer, + my_numlock_layer +); + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + rgblight_set_layer_state(2, led_state.num_lock); + return true; +} + +/* end RGB Test */ + +void keyboard_post_init_user(void) { + debug_enable=true; + debug_matrix=true; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + + // // Enable the LED layers + // rgblight_layers = my_rgb_layers; + // rgblight_set_layer_state(0, 1); + // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); + // rgblight_set_effect_range(2, 6); + + // rgblight_enable(); + // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case : + if (record->event.pressed) { + // Do something when pressed + } else { + // Do something else when release + print("begin rgb_mod\n"); + user_config.raw= eeconfig_read_user(); + uprintf("pre raw value: %lx\n", user_config.raw); + + user_config.rgb_layer_change = !user_config.rgb_layer_change; + eeconfig_update_user(user_config.raw); + + user_config.raw= eeconfig_read_user(); + uprintf("post raw value: %lx\n", user_config.raw); + print("done release rgb_mod\n"); + + #ifdef RGBLIGHT_ENABLE + print("begin change rgb mode\n"); + rgblight_step(); + print("done change rgb mode\n"); + #endif + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 2; + user_config.rgb_layer_change = true; // We want this enabled by default + eeconfig_update_user(user_config.raw); // Write default value to EEPROM now + + // use the non noeeprom versions, to write these values to EEPROM too +// rgblight_enable(); // Enable RGB by default +// rgblight_sethsv_cyan(); // Set it to CYAN by default +// rgblight_mode(1); // set to solid by default +} + +// void keyboard_post_init_user(void) { + +// debug_enable=true; +// debug_matrix=true; + +// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk new file mode 100644 index 000000000000..a40474b4d5c7 --- /dev/null +++ b/keyboards/uncertainty/keymaps/test/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/uncertainty/kipythonlog new file mode 100644 index 000000000000..7883889b77ec --- /dev/null +++ b/keyboards/uncertainty/kipythonlog @@ -0,0 +1,1667 @@ +Py 0.9.8 +Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py + +import pcbnew +pcbnew.GetBoard() + > +myboard = pcbnew.GetBoard() +for fp in myboard.GetFootprints(): + print(fp.GetReference()) + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +footprints = myboard.GetFootprints() +printf(footprints[0]) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'printf' is not defined +print(footprints[0]) +::value_type' at 0x00000218643C36F0> > +print(footprints[0].GetReference()) +D88 +print(footprints[0].fp_id) +Traceback (most recent call last): + File "", line 1, in +AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' +selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] +print(selected) +['D15'] +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) +... + File "", line 5 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + fi +... + File "", line 6 + ... + ^ +SyntaxError: invalid syntax +for fp in footprints: + if fp.ref == selected: + ref_fp = fp + print(ref_fp) + + +Traceback (most recent call last): + File "", line 2, in +AttributeError: 'FOOTPRINT' object has no attribute 'ref' +for fp in footprints: + try: + sheet_file = fp.GetProperty('Sheetfile') + # construct a list of all the footprints + mod_named_tuple = Footprint(fp=fp, + fp_id=self.get_footprint_id(fp), + sheet_id=self.get_sheet_path(fp)[0], + filename=self.get_sheet_path(fp)[1], + ref=fp.GetReference()) + self.footprints.append(mod_named_tuple) + except KeyError: + pass + pass + File "", line 13 + pass + ^ +IndentationError: unindent does not match any outer indentation level +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + File "", line 1 + fp_list = [] + ^ +SyntaxError: multiple statements found while compiling a single statement +fp_list = [] +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass +pass + File "", line 7 + pass + ^ +SyntaxError: invalid syntax +for fp in footprints: + try: + named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) + fp_list.append(named_tuple) + except KeyError: + pass + + +Traceback (most recent call last): + File "", line 3, in +NameError: name 'Footprint' is not defined +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) +Traceback (most recent call last): + File "", line 1, in +NameError: name 'fp_id' is not defined +fp_id = "" +for fp in footprints: + if fp.GetReference() == selected: + path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + + +print(fp_id) + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + + +for fp in footprints: + if fp.GetReference() == selected: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D88 +SW52 +D83 +D47 +C4 +SW91 +SW65 +SW14 +SW53 +D42 +D78 +SW4 +SW25 +D45 +D23 +D33 +C11 +SW36 +D24 +SW37 +SW33 +SW74 +REF** +D5 +D90 +SW81 +D86 +SW13 +SW92 +D15 +D70 +SW93 +D114 +D63 +SW72 +D93 +SW58 +D29 +D40 +D84 +SW76 +D3 +REF** +D37 +D95 +D52 +SW21 +D76 +SW90 +D39 +J1 +D1 +D46 +SW85 +D55 +D21 +SW17 +D34 +SW57 +SW43 +D98 +SW12 +SW38 +SW47 +D92 +D58 +D8 +SW97 +SW35 +SW102 +D18 +D74 +SW56 +SW34 +SW11 +D91 +SW103 +SW45 +D73 +D49 +D32 +SW78 +C7 +SW46 +D44 +D87 +SW66 +REF** +SW42 +SW55 +D51 +SW61 +C6 +R4 +D61 +D14 +SW101 +D20 +D97 +SW9 +D67 +SW50 +D59 +C5 +SW68 +SW63 +SW77 +C3 +D77 +SW6 +C1 +D30 +C2 +D57 +SW89 +SW86 +SW3 +REF** +SW75 +SW40 +D27 +D85 +SW39 +SW8 +SW87 +D19 +SW31 +D82 +D100 +U1 +D17 +SW20 +SW62 +SW71 +SW99 +D115 +D9 +D105 +SW29 +D72 +D68 +SW24 +SW60 +SW22 +D13 +SW26 +SW30 +SW100 +SW84 +SW104 +D80 +REF** +D16 +D101 +R5 +D50 +SW83 +D4 +SW98 +SW59 +D48 +D103 +SW23 +D62 +REF** +J2 +D66 +D25 +SW51 +D96 +U2 +C8 +SW37B1 +D102 +SW41 +SW64 +SW18 +SW28 +SW37B1 +D64 +SW80 +D69 +D75 +D104 +D12 +SW82 +SW32 +SW1 +D35 +C10 +D38 +SW79 +SW48 +SW96 +D53 +SW44 +D71 +SW94 +SW15 +D65 +D56 +D99 +SW54 +R2 +SW19 +SW27 +SW70 +D31 +D81 +SW49 +D10 +SW88 +C9 +SW16 +D2 +D22 +D43 +SW10 +R3 +D54 +D6 +D89 +D26 +SW95 +SW73 +R1 +D11 +D94 +D41 +D79 +D60 +D28 +SW67 +SW69 +SW2 +D7 +D36 +SW5 +SW7 +C12 +D108 +D111 +D110 +D106 +D109 +C13 +D107 +D112 +D113 +print(selected) +['D15'] +selected +['D15'] +selected[0] +'D15' +for fp in footprints: + if fp.GetReference() == selected[0]: + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + print(fp.GetReference()) + + +D15 +print(fp_id) +D51D642D-4C52-4D3C-BA63-D62449DDB306 +def get_fp_id(fp): + path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") + if len(path) != 1: + fp_id = path[-1] + else: + fp_id = None + return fp_id + + +for fp in footprints: + if get_fp_id(fp) == fp_id: + print(fp.GetReference()) + + + +D15 +def get_fp_diode(footprints): + diode_list = [] + + + +diode_list = [] +for fp in footprints: + ref = fp.GetReference() + if ref[0] == 'D': + diode_list.append(fp) + + +print(diode_list) +[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort + +diode_list.sort() +for fp in diode_list print(fp.GetReference()) + File "", line 1 + for fp in diode_list print(fp.GetReference()) + ^ +SyntaxError: invalid syntax +for fp in diode_list: print(fp.GetReference()) + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +diode_list.sort() +for fp in diode_list: + print(fp.GetReference()) + + +D88 +D83 +D47 +D42 +D78 +D45 +D23 +D33 +D24 +D5 +D90 +D86 +D15 +D70 +D114 +D63 +D93 +D29 +D40 +D84 +D3 +D37 +D95 +D52 +D76 +D39 +D1 +D46 +D55 +D21 +D34 +D98 +D92 +D58 +D8 +D18 +D74 +D91 +D73 +D49 +D32 +D44 +D87 +D51 +D61 +D14 +D20 +D97 +D67 +D59 +D77 +D30 +D57 +D27 +D85 +D19 +D82 +D100 +D17 +D115 +D9 +D105 +D72 +D68 +D13 +D80 +D16 +D101 +D50 +D4 +D48 +D103 +D62 +D66 +D25 +D96 +D102 +D64 +D69 +D75 +D104 +D12 +D35 +D38 +D53 +D71 +D65 +D56 +D99 +D31 +D81 +D10 +D2 +D22 +D43 +D54 +D6 +D89 +D26 +D11 +D94 +D41 +D79 +D60 +D28 +D7 +D36 +D108 +D111 +D110 +D106 +D109 +D107 +D112 +D113 +def sortByRef(e): + return e.GetReference() + + +diode_list.sort(key=sortByRef) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D10 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D11 +D110 +D111 +D112 +D113 +D114 +D115 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D2 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D3 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D4 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D5 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D6 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D7 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D8 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D9 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +def sortByRefNew(e): + ref = e.GetReference() + return int(ref[1:]) + + +diode_list.sort(key=sortByRefNew) +for fp in diode_list: + print(fp.GetReference()) + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +D106 +D107 +D108 +D109 +D110 +D111 +D112 +D113 +D114 +D115 +def fp_set_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.SetBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.SetBrightened() + + + + +for i in range(diode_list): + fp_set_highlight(diode_list[i]) + i = i + 17 + + +Traceback (most recent call last): + File "", line 1, in +TypeError: 'list' object cannot be interpreted as an integer +for col in range(0,105): + fp_set_highlight(diode_list[col]) + col = col + 17 + + +pcbnew.Refresh() +for col in range(0,105): + print(diode_list[col].GetReference()) + col = col + 17 + + +D1 +D2 +D3 +D4 +D5 +D6 +D7 +D8 +D9 +D10 +D11 +D12 +D13 +D14 +D15 +D16 +D17 +D18 +D19 +D20 +D21 +D22 +D23 +D24 +D25 +D26 +D27 +D28 +D29 +D30 +D31 +D32 +D33 +D34 +D35 +D36 +D37 +D38 +D39 +D40 +D41 +D42 +D43 +D44 +D45 +D46 +D47 +D48 +D49 +D50 +D51 +D52 +D53 +D54 +D55 +D56 +D57 +D58 +D59 +D60 +D61 +D62 +D63 +D64 +D65 +D66 +D67 +D68 +D69 +D70 +D71 +D72 +D73 +D74 +D75 +D76 +D77 +D78 +D79 +D80 +D81 +D82 +D83 +D84 +D85 +D86 +D87 +D88 +D89 +D90 +D91 +D92 +D93 +D94 +D95 +D96 +D97 +D98 +D99 +D100 +D101 +D102 +D103 +D104 +D105 +for i in range(0,105,17): + print(diode_list[i].GetReference()) + + +D1 +D18 +D35 +D52 +D69 +D86 +D103 +for i in range(0,105,18): + print(diode_list[i].GetReference()) + . + + File "", line 3 + . + ^ +SyntaxError: invalid syntax +for i in range(0,105,18): + print(diode_list[i].GetReference()) + + +D1 +D19 +D37 +D55 +D73 +D91 +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def fp_clear_highlight(fp): + pads_list = fp.Pads() + for pad in pads_list: + pad.ClearBrightened() + drawings = fp.GraphicalItems() + for item in drawings: + item.ClearBrightened() + +for fp in diode_list: + fp_clear_highlight(fp) + +pcbnew.Refresh() +for i in range(0,105,18): + fp_set_highlight(diode_list[i]) + +pcbnew.Refresh() +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +fp_to_place = [] +for i in range(0,105,18): + fp_to_place.append(diode_list[i]) + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + + +place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in +TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 10, in place_linear +AttributeError: 'list' object has no attribute 'GetPosition' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.fp.IsFlipped() != ref_fp.IsFlipped(): + fp.fp.Flip(fp.fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 17, in place_linear +AttributeError: 'FOOTPRINT' object has no attribute 'fp' +def place_linear(footprints_to_place, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 20, in place_linear +NameError: name 'SCALE' is not defined +SCALE = 1000000.0 +place_linear(fp_to_place, 3, 0, 0, 0) +Traceback (most recent call last): + File "", line 1, in + File "", line 24, in place_linear +ZeroDivisionError: integer division or modulo by zero +place_linear(fp_to_place, 3, 0, 1, 0) +pcbnew.Refresh() diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/uncertainty/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/placefp.py b/keyboards/uncertainty/placefp.py new file mode 100644 index 000000000000..dc5954624e4c --- /dev/null +++ b/keyboards/uncertainty/placefp.py @@ -0,0 +1,55 @@ +import pcbnew + +SCALE = 1000000.0 +board = pcbnew.GetBoard() + +def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): + # get proper footprint list + footprints = [] + for fp in footprints_to_place: + footprints.append(fp) + + #ref_fp = footprints_to_place[0] + + # get reference footprint position + ref_fp_pos = ref_fp.GetPosition() + ref_fp_index = -1 #footprints.index(ref_fp) + + for fp in footprints: + index = footprints.index(fp) + delta_index = index-ref_fp_index + + if fp.IsFlipped() != ref_fp.IsFlipped(): + fp.Flip(fp.GetPosition(), False) + + new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) + new_position = [int(x) for x in new_position] + fp.SetPosition(pcbnew.wxPoint(*new_position)) + footprint_angle = ref_fp.GetOrientationDegrees() + footprint_angle = footprint_angle + index // step * rotation + fp.SetOrientationDegrees(footprint_angle) + +def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): + #row = len(footprints_to_place) / col + + #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] + #first row + place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) + for i in range(col): + place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) + pcbnew.Refresh() + +def get_selected(): + #get list of selected fp + selected = [x for x in board.GetFootprints() if x.IsSelected()] + return selected + #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) +def sort_by_ref(fpList, reversed=False): + str = fpList[0].GetReference() + for i, char in enumerate(str): + # Checking if char is numeric + if char.isdigit(): + index = i + break + fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) + return fpList diff --git a/keyboards/uncertainty/readme.md b/keyboards/uncertainty/readme.md new file mode 100644 index 000000000000..cd3c36958e06 --- /dev/null +++ b/keyboards/uncertainty/readme.md @@ -0,0 +1,27 @@ +# uncertainty + +![uncertainty](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make uncertainty:default + +Flashing example for this keyboard: + + make uncertainty:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/uncertainty/rules.mk b/keyboards/uncertainty/rules.mk new file mode 100644 index 000000000000..6b7648feb02f --- /dev/null +++ b/keyboards/uncertainty/rules.mk @@ -0,0 +1,10 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h new file mode 100644 index 000000000000..ade817c14d78 --- /dev/null +++ b/keyboards/uncertainty/test/config.h @@ -0,0 +1,71 @@ +// Copyright 2022 Thanh Vinh (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* WS2812 driver config specifically for STM32F401 */ + +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) +#ifdef RGBLIGHT_ENABLE + // #define RGB_DI_PIN B1 + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 + #define WS2812_PWM_PAL_MODE 2 // AF2 + + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) + + // #define RGBLIGHT_LAYERS + // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#endif + +#define DEBUG_EEPROM_OUTPUT + +/* i2c peripheral config */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 +#define I2C_SCL_PAL_MODE 4 +#define I2C_SDA_PAL_MODE 4 + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +/* eeprom i2c driver config */ +#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_BYTE_COUNT 4096 +#define EXTERNAL_EEPROM_PAGE_SIZE 32 +#define EXTERNAL_EEPROM_WRITE_TIME 10 +//#define EEPROM_I2C_24LC32 + +/* OLED config */ +#ifdef OLED_ENABLE +// #define OLED_IC OLED_IC_SH1106 +// #define OLED_COLUMN_OFFSET 2 + +// #define OLED_DISPLAY_128X64 +#define OLED_UPDATE_INTERVAL 100 +#define OLED_BRIGHTNESS 200 +//#define OLED_DISPLAY_ADDRESS 0x3C + +#endif + +/* encoder config */ +// #define ENCODERS_PAD_A { B12 } +// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h new file mode 100644 index 000000000000..dfc6a7bdd4dd --- /dev/null +++ b/keyboards/uncertainty/test/halconf.h @@ -0,0 +1,13 @@ +#pragma once + + +#ifdef RGBLIGHT_ENABLE + #undef HAL_USE_PWM + #define HAL_USE_PWM TRUE +#endif + +#undef HAL_USE_I2C +#define HAL_USE_I2C TRUE + + +#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json new file mode 100644 index 000000000000..50695e5af536 --- /dev/null +++ b/keyboards/uncertainty/test/info.json @@ -0,0 +1,163 @@ +{ + "manufacturer": "Thanh Vinh", + "keyboard_name": "uncertainty", + "maintainer": "vinhcatba", + "processor": "STM32F401", + "bootloader": "stm32-dfu", + "board": "BLACKPILL_STM32_F401", + + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgblight": true + }, + "matrix_pins": { + "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], + "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + { "pin_a": "A13", "pin_b": "A14" } + ] + }, + "rgblight": { + "led_count": 14, + "pin": "B1", + "sleep": true, + "max_brightness": 100, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "animations": { + "all": true, + "knight": true, + "rainbow_mood": true, + "rgb_test": true + } + }, + + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, + {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, + {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, + {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, + {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, + {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, + {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, + {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, + {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, + {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, + {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, + {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, + {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, + {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, + {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, + {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, + {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, + {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, + {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, + {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, + {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, + {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, + {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, + {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, + {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, + {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, + {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, + {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, + {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, + {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, + {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, + {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, + {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, + {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, + {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, + {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, + {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, + {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, + {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, + {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, + {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, + {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, + {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, + {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, + {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, + {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, + {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, + {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, + {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, + {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, + {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, + {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, + {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, + {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, + {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, + {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, + {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, + {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, + {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, + {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, + {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, + {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, + {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, + {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, + {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, + {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, + {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, + {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, + {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, + {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, + {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, + {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, + {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, + {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, + {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, + {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, + {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, + {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, + {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, + {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, + {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, + {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, + {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, + {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, + {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, + {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, + {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, + {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, + {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, + {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, + {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, + {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, + {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, + {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, + {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, + {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, + {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h new file mode 100644 index 000000000000..53d967f53473 --- /dev/null +++ b/keyboards/uncertainty/test/mcuconf.h @@ -0,0 +1,10 @@ +#pragma once +#include_next + +#ifdef RGBLIGHT_ENABLE + #undef STM32_PWM_USE_TIM3 + #define STM32_PWM_USE_TIM3 TRUE +#endif + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk new file mode 100644 index 000000000000..cbaaf52ddd1a --- /dev/null +++ b/keyboards/uncertainty/test/rules.mk @@ -0,0 +1,13 @@ +# using pwm driver on stm32f401 +WS2812_DRIVER = pwm + +# using external i2c eeprom +EEPROM_DRIVER = i2c + +# using SSD1306 OLED driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # WPM counter for oled + +# using rotary encoder +# ENCODER_ENABLE = yes From 67ee969534d94e408ab5849a32304650a9f93008 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 01:55:05 +0700 Subject: [PATCH 26/46] v0.1: update base firmware with 2 layers, use bongo cat animation for oled --- keyboards/uncertainty/chconf.h.old | 25 - keyboards/uncertainty/config.h | 17 +- keyboards/uncertainty/halconf.h | 4 +- keyboards/uncertainty/info.json | 218 +++---- keyboards/uncertainty/keymaps/default/bongo.h | 514 +++++++++++++++ .../uncertainty/keymaps/default/keymap.c | 80 ++- .../uncertainty/keymaps/default/keymap.json | 8 - .../uncertainty/keymaps/default/rules.mk | 3 +- keyboards/uncertainty/keymaps/test/keymap.c | 588 ------------------ keyboards/uncertainty/keymaps/test/rules.mk | 1 - keyboards/uncertainty/test/config.h | 71 --- keyboards/uncertainty/test/halconf.h | 13 - keyboards/uncertainty/test/info.json | 163 ----- keyboards/uncertainty/test/mcuconf.h | 10 - keyboards/uncertainty/test/rules.mk | 13 - 15 files changed, 671 insertions(+), 1057 deletions(-) delete mode 100644 keyboards/uncertainty/chconf.h.old create mode 100644 keyboards/uncertainty/keymaps/default/bongo.h delete mode 100644 keyboards/uncertainty/keymaps/default/keymap.json delete mode 100644 keyboards/uncertainty/keymaps/test/keymap.c delete mode 100644 keyboards/uncertainty/keymaps/test/rules.mk delete mode 100644 keyboards/uncertainty/test/config.h delete mode 100644 keyboards/uncertainty/test/halconf.h delete mode 100644 keyboards/uncertainty/test/info.json delete mode 100644 keyboards/uncertainty/test/mcuconf.h delete mode 100644 keyboards/uncertainty/test/rules.mk diff --git a/keyboards/uncertainty/chconf.h.old b/keyboards/uncertainty/chconf.h.old deleted file mode 100644 index a6e216133f50..000000000000 --- a/keyboards/uncertainty/chconf.h.old +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -// #include_next - -#undef CH_CFG_ST_FREQUENCY -#define CH_CFG_ST_FREQUENCY 10000 - -#undef CH_CFG_FACTORY_OBJECTS_REGISTRY -#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE - -#undef CH_CFG_FACTORY_GENERIC_BUFFERS -#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE - -#undef CH_CFG_FACTORY_SEMAPHORES -#define CH_CFG_FACTORY_SEMAPHORES TRUE - -#undef CH_CFG_FACTORY_MAILBOXES -#define CH_CFG_FACTORY_MAILBOXES TRUE - -#undef CH_CFG_FACTORY_OBJ_FIFOS -#define CH_CFG_FACTORY_OBJ_FIFOS TRUE - -#undef CH_CFG_FACTORY_PIPES -#define CH_CFG_FACTORY_PIPES TRUE -#include_next - diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h index 9eb0322b7adc..79407df65bd2 100644 --- a/keyboards/uncertainty/config.h +++ b/keyboards/uncertainty/config.h @@ -21,15 +21,16 @@ /* WS2812 driver config specifically for STM32F401 */ -// DI pin = PB8, which is AF02, TIM4_CH3 (table 9 in datasheet) +// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B8 - #define WS2812_PWM_DRIVER PWMD3 // TIM4 - #define WS2812_PWM_CHANNEL 4 // CH3 + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + + #define WS2812_PWM_DRIVER PWMD3 // TIM3 + #define WS2812_PWM_CHANNEL 4 // CH4 #define WS2812_PWM_PAL_MODE 2 // AF2 - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 6 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 2 for TIM4_UP (table 28 in reference manual) + #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) + #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) // #define RGBLIGHT_LAYERS // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF @@ -56,7 +57,7 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 +// #define OLED_IC OLED_IC_SH1106 // #define OLED_COLUMN_OFFSET 2 // #define OLED_DISPLAY_128X64 @@ -65,5 +66,3 @@ //#define OLED_DISPLAY_ADDRESS 0x3C #endif - - diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h index dfc6a7bdd4dd..84921df44339 100644 --- a/keyboards/uncertainty/halconf.h +++ b/keyboards/uncertainty/halconf.h @@ -1,6 +1,5 @@ #pragma once - #ifdef RGBLIGHT_ENABLE #undef HAL_USE_PWM #define HAL_USE_PWM TRUE @@ -9,5 +8,4 @@ #undef HAL_USE_I2C #define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file +#include_next diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json index 7e982dcb20c8..a2e643068e17 100644 --- a/keyboards/uncertainty/info.json +++ b/keyboards/uncertainty/info.json @@ -21,7 +21,7 @@ "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] }, - "url": "", + "url": "", "usb": { "device_version": "1.0.0", "pid": "0x0000", @@ -29,14 +29,14 @@ }, "encoder": { "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } + { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } ] }, "rgblight": { - "led_count": 8, + "led_count": 14, "pin": "B1", "sleep": true, - "max_brightness": 100, + "max_brightness": 255, "brightness_steps": 10, "layers": { "enabled": true, @@ -53,111 +53,111 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} + {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, + {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, + {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, + {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, + {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, + {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, + {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, + {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, + {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, + {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, + {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, + {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, + {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, + {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, + {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, + {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, + {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, + {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, + {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, + {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, + {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, + {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, + {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, + {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, + {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, + {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, + {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, + {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, + {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, + {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, + {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, + {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, + {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, + {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, + {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, + {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, + {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, + {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, + {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, + {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, + {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, + {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, + {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, + {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, + {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, + {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, + {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, + {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, + {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, + {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, + {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, + {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, + {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, + {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, + {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, + {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, + {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, + {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, + {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, + {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, + {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, + {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, + {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, + {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, + {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, + {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, + {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, + {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, + {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, + {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, + {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, + {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, + {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, + {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, + {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, + {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, + {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, + {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, + {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, + {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, + {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, + {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, + {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, + {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, + {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, + {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, + {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, + {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, + {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, + {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, + {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, + {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, + {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, + {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, + {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, + {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, + {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, + {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, + {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, + {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, + {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, + {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, + {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, + {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} ] } } -} \ No newline at end of file +} diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/uncertainty/keymaps/default/bongo.h new file mode 100644 index 000000000000..442ef5666a76 --- /dev/null +++ b/keyboards/uncertainty/keymaps/default/bongo.h @@ -0,0 +1,514 @@ +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +static void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + sprintf(wpm, "WPM:%03d", get_current_wpm()); + oled_write(wpm, false); + + // // calculate && print clock + // oled_set_cursor(0, 2); + // uint8_t hour = last_minute / 60; + // uint16_t minute = last_minute % 60; + // bool is_pm = (hour / 12) > 0; + // hour = hour % 12; + // if (hour == 0) { + // hour = 12; + // } + // static char time_str[8] = ""; + // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + // oled_write(time_str, false); + } +} diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c index 3b2b513402f3..141dea017066 100644 --- a/keyboards/uncertainty/keymaps/default/keymap.c +++ b/keyboards/uncertainty/keymaps/default/keymap.c @@ -1,9 +1,17 @@ +#include "keycodes.h" #include QMK_KEYBOARD_H #include "print.h" #include + +#define BONGO_ENABLE +#ifdef BONGO_ENABLE +#include "bongo.h" +#endif + char wpm_str[10]; + typedef union { uint32_t raw; struct { @@ -12,8 +20,8 @@ typedef union { } user_config_t; user_config_t user_config; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* TODO: add layers, add macro */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ @@ -27,34 +35,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ + * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_MUTE, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + RGB_MOD, 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_P4, KC_P5, KC_P6, + C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, + C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#if defined(ENCODER_MAP_ENABLE) +#ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } }; #endif #ifdef RGBLIGHT_ENABLE +#define HSV_PASTEL_BLUE 150, 155, 51 // Light LEDs 0 red when caps lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 ); // Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( @@ -83,8 +101,8 @@ void keyboard_post_init_user(void) { rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - rgblight_set_effect_range(2, 6); - + rgblight_set_effect_range(2, 12); + rgblight_enable(); //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); @@ -93,7 +111,7 @@ void keyboard_post_init_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case : + case RGB_MOD: if (record->event.pressed) { // Do something when pressed } else { @@ -140,35 +158,11 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! // } #ifdef OLED_ENABLE -// typedef enum { -// OLED_ROTATION_0 = 0, -// OLED_ROTATION_90 = 1, -// OLED_ROTATION_180 = 2, -// OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 -// } oled_rotation_t; -// oled_rotation_t oled_init_user(oled_rotation_t rotation) { -// return OLED_ROTATION_90; -// } -// bool oled_task_user(void) { -// oled_write_P(PSTR("WPM: "), false); -// oled_write(get_u8_str(get_current_wpm(), '0'), false); -// return false; -// } -static void render_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 - }; - - oled_write_P(qmk_logo, false); -} +/* TODO: update bongo cat animation */ +// Used to draw on to the oled screen bool oled_task_user(void) { - //render_logo(); - //oled_set_cursor(1, 1); - oled_write_P(PSTR("WPM: "), false); - oled_write(get_u8_str(get_current_wpm(), '0'), false); + draw_bongo(true); return false; } #endif diff --git a/keyboards/uncertainty/keymaps/default/keymap.json b/keyboards/uncertainty/keymaps/default/keymap.json deleted file mode 100644 index 127a66c02f3f..000000000000 --- a/keyboards/uncertainty/keymaps/default/keymap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "keyboard": "uncertainty", - "keymap": "default", - "layers": [ - ["KC_ESC", "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_PSCR", "KC_DEL", "KC_HOME", "KC_END", "KC_PGUP", "KC_PGDN", "KC_GRV", "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_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_MUTE", "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", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_NO", "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_P4", "KC_P5", "KC_P6", "KC_NO", "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_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_NO", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_P0", "KC_PDOT"] - ], - "layout": "LAYOUT" -} \ No newline at end of file diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk index 3086a27b34f2..c922e471fa86 100644 --- a/keyboards/uncertainty/keymaps/default/rules.mk +++ b/keyboards/uncertainty/keymaps/default/rules.mk @@ -1 +1,2 @@ -//ENCODER_MAP_ENABLE = yes \ No newline at end of file +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes diff --git a/keyboards/uncertainty/keymaps/test/keymap.c b/keyboards/uncertainty/keymaps/test/keymap.c deleted file mode 100644 index b4ba6ecd2f2c..000000000000 --- a/keyboards/uncertainty/keymaps/test/keymap.c +++ /dev/null @@ -1,588 +0,0 @@ -#include QMK_KEYBOARD_H - - -#include "print.h" -#include -char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -/* Encoder mapping */ -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) } -}; -#endif - -/* Keymap */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* 0 - * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ - * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ - * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ - * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | - * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | - * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ - * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ - * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ - * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - */ - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - TD_OLED, 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 , KC_P7, KC_P8, KC_P9, KC_PPLS, - XXXXXXX, 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_P4, KC_P5, KC_P6, - XXXXXXX, 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_P1, KC_P2, KC_P3, KC_PENT, - XXXXXXX, KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ) -}; -/* end Keymap */ - -/* OLED test */ -enum tap_dances { - TD_OLED, -}; -enum oled_test_modes { - // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. - TEST_FIRST, - TEST_LOGO = TEST_FIRST, - TEST_CHARACTERS, - TEST_SLOW_UPDATE, - TEST_ALL_ON, - TEST_FRAME, - TEST_ALL_OFF, - TEST_FILL_HORZ_0, - TEST_FILL_HORZ_1, - TEST_FILL_VERT_0, - TEST_FILL_VERT_1, - TEST_FILL_CHECKERBOARD_1, - TEST_FILL_CHECKERBOARD_2, - TEST_FILL_CHECKERBOARD_4, - TEST_LAST = TEST_FILL_CHECKERBOARD_4, - - // Special modes which are not reachable normally. - TEST_DRAW_ALWAYS_ON, - TEST_DRAW_ALWAYS_OFF, -}; - -static enum oled_test_modes test_mode = TEST_FIRST; - -static oled_rotation_t rotation = OLED_ROTATION_0; - -static bool scrolling; -static uint8_t scrolling_speed; -static bool need_update = true; -static bool draw_always; -static bool update_speed_test; -static uint32_t update_speed_start_timer; -static uint16_t update_speed_count; -static bool restart_test; - -static void stop_scrolling(void) { - if (scrolling) { - oled_scroll_off(); - scrolling = false; - } -} - -static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - if (state->pressed) { - // single hold - step through rotations - switch (rotation) { - case OLED_ROTATION_0: - rotation = OLED_ROTATION_90; - break; - case OLED_ROTATION_90: - rotation = OLED_ROTATION_180; - break; - case OLED_ROTATION_180: - rotation = OLED_ROTATION_270; - break; - default: - rotation = OLED_ROTATION_0; - break; - } - stop_scrolling(); - oled_init(rotation); - } else { - // single tap - step through test modes - if (test_mode < TEST_LAST) { - ++test_mode; - } else { - test_mode = TEST_FIRST; - } - stop_scrolling(); - oled_clear(); - } - restart_test = true; - need_update = true; - break; - - case 2: - if (state->pressed) { - // tap + hold - change scrolling speed - scrolling_speed = (scrolling_speed + 1) % 8; - stop_scrolling(); - oled_scroll_set_speed(scrolling_speed); - // Cannot reactivate scrolling here, because oled_scroll_off() - // marks the whole display as dirty, and oled_scroll_left() - // silently does nothing if either the display is dirty or - // scrolling is already active. - } else { - // double tap - toggle scrolling - if (!scrolling) { - scrolling = true; - oled_scroll_left(); - } else { - scrolling = false; - oled_scroll_off(); - } - } - need_update = true; - break; - - case 3: - if (state->pressed) { - // double tap + hold - toggle `draw_always` - draw_always = !draw_always; - if (draw_always) { - test_mode = TEST_DRAW_ALWAYS_ON; - } else { - test_mode = TEST_DRAW_ALWAYS_OFF; - } - stop_scrolling(); - oled_clear(); - restart_test = true; - need_update = true; - } else { - // triple tap - toggle update speed test - update_speed_test = !update_speed_test; - if (update_speed_test) { - stop_scrolling(); - update_speed_start_timer = timer_read32(); - update_speed_count = 0; - } - } - break; - case 4: - if (!state->pressed) { - // quadruple tap - step through brightness levels - oled_set_brightness(oled_get_brightness() + 0x10); - } - break; - default: - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; - -// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; - -// `bool oled_is_dirty(void)` does not exist at the moment -extern OLED_BLOCK_TYPE oled_dirty; - -static inline uint8_t pixel_width(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH; - } - return OLED_DISPLAY_HEIGHT; -} - -static inline uint8_t pixel_height(void) { - if (!(rotation & OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT; - } - return OLED_DISPLAY_WIDTH; -} - -// Draw the QMK logo at the top left corner, clipping if it does not fit. -static void test_logo(void) { - uint8_t lines = oled_max_lines(); - if (lines > 3) { - lines = 3; - } - uint8_t chars = oled_max_chars(); - if (chars > 21) { - chars = 21; - } - for (uint8_t row = 0; row < lines; ++row) { - oled_set_cursor(0, row); - for (uint8_t col = 0; col < chars; ++col) { - oled_write_char(0x80 + 0x20 * row + col, false); - } - } -} - -static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; - -// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. -static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { - uint8_t width = pixel_width(); - uint8_t lines = oled_max_lines(); - uint16_t index = 0; - for (uint8_t row = 0; row < lines; ++row) { - for (uint8_t col = 0; col < width; ++col) { - uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; - oled_write_raw_byte(byte, index++); - } - } -} - -// Draw a frame at the edges of the OLED screen. -static void test_frame(void) { - uint8_t width = pixel_width(); - uint8_t height = pixel_height(); - for (uint8_t x = 0; x < width; ++x) { - oled_write_pixel(x, 0, true); - oled_write_pixel(x, height - 1, true); - } - for (uint8_t y = 1; y < height - 1; ++y) { - oled_write_pixel(0, y, true); - oled_write_pixel(width - 1, y, true); - } -} - -// Use all 94 visible ASCII characters for testing. -#define TEST_CHAR_COUNT ('~' - '!' + 1) - -static char get_test_char(uint8_t char_index) { return char_index + '!'; } - -// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters -// at once, the sequence is repeated the second time with inverted characters). -static void test_characters(void) { - uint8_t cols = oled_max_chars(); - uint8_t rows = oled_max_lines(); - bool invert = false; - uint8_t char_index = 0; - for (uint8_t row = 0; row < rows; ++row) { - for (uint8_t col = 0; col < cols; ++col) { - oled_write_char(get_test_char(char_index), invert); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - invert = !invert; - } - } - } -} - -// Test screen updating after drawing a single character or pixel. -void test_slow_update(void) { - static uint8_t phase, x, y, char_index, first_char; - static uint16_t timer; - static uint16_t delay = 500; - - if (restart_test) { - // Initialize all state variables before starting the test. - restart_test = false; - phase = 0; - x = 0; - y = 0; - char_index = 0; - first_char = 0; - delay = 500; - } else { - // Wait for the specified time between steps. - if (timer_elapsed(timer) < delay) { - return; - } - } - - timer = timer_read(); - switch (phase) { - case 0: - // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the - // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be - // overlapped by the inverted character background. - oled_set_cursor(x, y); - oled_write_char(get_test_char(char_index), false); - if (++char_index >= TEST_CHAR_COUNT) { - char_index = 0; - } - if (++x >= oled_max_chars()) { - x = 0; - if (++y >= oled_max_lines()) { - // The whole screen was filled - start the next phase. - ++phase; - x = y = 0; - } - } - delay = 250; - break; - - case 1: - // Phase 1: draw a line along the left edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y < pixel_height() - 1) { - ++y; - } else { - // The bottom left corner is reached - start the next phase. - ++phase; - ++x; - } - delay = 50; - break; - - case 2: - // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x < pixel_width() - 1) { - ++x; - } else { - // The bottom right corner was reached - start the next phase. - ++phase; - --y; - } - delay = 50; - break; - - case 3: - // Phase 3: draw a line along the right edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (y > 0) { - --y; - } else { - // The top right corner was reached - start the next phase. - ++phase; - --x; - } - delay = 50; - break; - - case 4: - // Phase 4: draw a line along the top edge of the screen, one pixel at a time. - oled_write_pixel(x, y, true); - if (x > 0) { - --x; - } else { - // The top left corner was reached - start the next phase. - ++phase; - } - delay = 50; - break; - - default: - // Restart from phase 0, but change the first character of the sequence to make screen updates visible. - if (++first_char >= TEST_CHAR_COUNT) { - first_char = 0; - } - phase = 0; - x = 0; - y = 0; - char_index = first_char; - delay = 500; - break; - } -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - oled_scroll_set_area(0, 0); - oled_scroll_set_speed(scrolling_speed); - return rotation; -} - -bool oled_task_user(void) { - if (update_speed_test) { - // Speed test mode - wait for screen update completion. - if (!oled_dirty) { - // Update statistics and send the measurement result to the console. - update_speed_count++; - if (update_speed_count % 256 == 0) { - uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); - } - - // Toggle between the "all on" and "all off" states and trigger the screen update again. - if (test_mode == TEST_ALL_ON) { - test_mode = TEST_ALL_OFF; - } else { - test_mode = TEST_ALL_ON; - } - need_update = true; - } - } - - // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on - // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty - // bits only when something has actually changed. However, redrawing the image only when some of the underlying - // data has changed is more efficient. Make it possible to test both modes here. - if (!draw_always || update_speed_test) { - // Draw the image only when the `need_update` flag is set, except for the "slow update" test. - // This mode is also forced when the screen update speed test is performed. - if (!need_update) { - if (test_mode != TEST_SLOW_UPDATE) { - return false; - } - } - need_update = false; - } - - switch (test_mode) { - case TEST_LOGO: - test_logo(); - break; - case TEST_CHARACTERS: - test_characters(); - break; - case TEST_SLOW_UPDATE: - test_slow_update(); - break; - case TEST_ALL_ON: - oled_write_raw_P(fill_ff, sizeof(fill_ff)); - break; - case TEST_FRAME: - test_frame(); - break; - case TEST_ALL_OFF: - // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous - // content of the buffer and always marks the whole buffer as dirty. - if (update_speed_test) { - oled_clear(); - } else { - test_fill(0x00, 0x00, 1); - } - break; - case TEST_FILL_HORZ_0: - test_fill(0x55, 0x55, 1); - break; - case TEST_FILL_HORZ_1: - test_fill(0xaa, 0xaa, 1); - break; - case TEST_FILL_VERT_0: - test_fill(0xff, 0x00, 1); - break; - case TEST_FILL_VERT_1: - test_fill(0x00, 0xff, 1); - break; - case TEST_FILL_CHECKERBOARD_1: - test_fill(0x55, 0xaa, 1); - break; - case TEST_FILL_CHECKERBOARD_2: - test_fill(0x33, 0xcc, 2); - break; - case TEST_FILL_CHECKERBOARD_4: - test_fill(0x0f, 0xf0, 4); - break; - - case TEST_DRAW_ALWAYS_ON: - oled_write_P(PSTR("Draw Always"), false); - break; - case TEST_DRAW_ALWAYS_OFF: - oled_write_P(PSTR("Draw Once"), false); - break; - } - return false; -} -/* -------------------------------------------------------------------*/ -/* end OLED test */ - -user_config_t user_config; - -/* RGB Test */ -#ifdef RGBLIGHT_ENABLE -// Light LEDs 0 red when caps lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 0 -); - -// Light LEDs 1 red when num lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_GREEN} // Light 1 LEDs, starting with LED 1 -); - -const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - indicators_off_layer, - my_capslock_layer, - my_numlock_layer -); - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(1, led_state.caps_lock); - rgblight_set_layer_state(2, led_state.num_lock); - return true; -} - -/* end RGB Test */ - -void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom_cyan(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - - // // Enable the LED layers - // rgblight_layers = my_rgb_layers; - // rgblight_set_layer_state(0, 1); - // // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - // rgblight_set_effect_range(2, 6); - - // rgblight_enable(); - // //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case : - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } diff --git a/keyboards/uncertainty/keymaps/test/rules.mk b/keyboards/uncertainty/keymaps/test/rules.mk deleted file mode 100644 index a40474b4d5c7..000000000000 --- a/keyboards/uncertainty/keymaps/test/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/uncertainty/test/config.h b/keyboards/uncertainty/test/config.h deleted file mode 100644 index ade817c14d78..000000000000 --- a/keyboards/uncertainty/test/config.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* WS2812 driver config specifically for STM32F401 */ - -// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - // #define RGB_DI_PIN B1 - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 - - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM4_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM4_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF -#endif - -#define DEBUG_EEPROM_OUTPUT - -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 - -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -/* eeprom i2c driver config */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 -#define EXTERNAL_EEPROM_BYTE_COUNT 4096 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_WRITE_TIME 10 -//#define EEPROM_I2C_24LC32 - -/* OLED config */ -#ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 -#define OLED_UPDATE_INTERVAL 100 -#define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - -#endif - -/* encoder config */ -// #define ENCODERS_PAD_A { B12 } -// #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/uncertainty/test/halconf.h b/keyboards/uncertainty/test/halconf.h deleted file mode 100644 index dfc6a7bdd4dd..000000000000 --- a/keyboards/uncertainty/test/halconf.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - - -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif - -#undef HAL_USE_I2C -#define HAL_USE_I2C TRUE - - -#include_next \ No newline at end of file diff --git a/keyboards/uncertainty/test/info.json b/keyboards/uncertainty/test/info.json deleted file mode 100644 index 50695e5af536..000000000000 --- a/keyboards/uncertainty/test/info.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", - "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": true, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], - "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] - }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14" } - ] - }, - "rgblight": { - "led_count": 14, - "pin": "B1", - "sleep": true, - "max_brightness": 100, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, - "animations": { - "all": true, - "knight": true, - "rainbow_mood": true, - "rgb_test": true - } - }, - - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "K00 (B0,B6)", "matrix": [0, 0], "x": 1.25, "y": 0.25}, - {"label": "K01 (B0,B7)", "matrix": [0, 1], "x": 2.25, "y": 0.25}, - {"label": "K02 (B0,C0)", "matrix": [0, 2], "x": 3.25, "y": 0.25}, - {"label": "K03 (B0,C1)", "matrix": [0, 3], "x": 4.25, "y": 0.25}, - {"label": "K04 (B0,C2)", "matrix": [0, 4], "x": 5.25, "y": 0.25}, - {"label": "K05 (B0,C3)", "matrix": [0, 5], "x": 6.25, "y": 0.25}, - {"label": "K06 (B0,C4)", "matrix": [0, 6], "x": 7.25, "y": 0.25}, - {"label": "K07 (B0,C5)", "matrix": [0, 7], "x": 8.25, "y": 0.25}, - {"label": "K08 (B0,C6)", "matrix": [0, 8], "x": 9.25, "y": 0.25}, - {"label": "K09 (B0,C7)", "matrix": [0, 9], "x": 10.25, "y": 0.25}, - {"label": "K0A (B0,D0)", "matrix": [0, 10], "x": 11.25, "y": 0.25}, - {"label": "K0B (B0,D1)", "matrix": [0, 11], "x": 12.25, "y": 0.25}, - {"label": "K0C (B0,D2)", "matrix": [0, 12], "x": 13.25, "y": 0.25}, - {"label": "K0D (B0,D3)", "matrix": [0, 13], "x": 14.25, "y": 0.25}, - {"label": "K0E (B0,D4)", "matrix": [0, 14], "x": 15.25, "y": 0.25}, - {"label": "K0F (B0,D5)", "matrix": [0, 15], "x": 16.25, "y": 0.25}, - {"label": "K0G (B0,E1)", "matrix": [0, 16], "x": 17.25, "y": 0.25}, - {"label": "K0H (B0,F5)", "matrix": [0, 17], "x": 18.25, "y": 0.25}, - {"label": "K1H (B1,F5)", "matrix": [1, 17], "x": 19.25, "y": 0.25}, - {"label": "K10 (B1,B6)", "matrix": [1, 0], "x": 1.25, "y": 1.25}, - {"label": "K11 (B1,B7)", "matrix": [1, 1], "x": 2.25, "y": 1.25}, - {"label": "K12 (B1,C0)", "matrix": [1, 2], "x": 3.25, "y": 1.25}, - {"label": "K13 (B1,C1)", "matrix": [1, 3], "x": 4.25, "y": 1.25}, - {"label": "K14 (B1,C2)", "matrix": [1, 4], "x": 5.25, "y": 1.25}, - {"label": "K15 (B1,C3)", "matrix": [1, 5], "x": 6.25, "y": 1.25}, - {"label": "K16 (B1,C4)", "matrix": [1, 6], "x": 7.25, "y": 1.25}, - {"label": "K17 (B1,C5)", "matrix": [1, 7], "x": 8.25, "y": 1.25}, - {"label": "K18 (B1,C6)", "matrix": [1, 8], "x": 9.25, "y": 1.25}, - {"label": "K19 (B1,C7)", "matrix": [1, 9], "x": 10.25, "y": 1.25}, - {"label": "K1A (B1,D0)", "matrix": [1, 10], "x": 11.25, "y": 1.25}, - {"label": "K1B (B1,D1)", "matrix": [1, 11], "x": 12.25, "y": 1.25}, - {"label": "K1C (B1,D2)", "matrix": [1, 12], "x": 13.25, "y": 1.25}, - {"label": "K1D (B1,D3)", "matrix": [1, 13], "x": 14.25, "y": 1.25, "w": 2}, - {"label": "K1E (B1,D4)", "matrix": [1, 14], "x": 16.25, "y": 1.25}, - {"label": "K1F (B1,D5)", "matrix": [1, 15], "x": 17.25, "y": 1.25}, - {"label": "K1G (B1,E1)", "matrix": [1, 16], "x": 18.25, "y": 1.25}, - {"label": "K2H (B2,F5)", "matrix": [2, 17], "x": 19.25, "y": 1.25}, - {"label": "K20 (B2,B6)", "matrix": [2, 0], "x": 0, "y": 2}, - {"label": "K21 (B2,B7)", "matrix": [2, 1], "x": 1.25, "y": 2.25, "w": 1.5}, - {"label": "K22 (B2,C0)", "matrix": [2, 2], "x": 2.75, "y": 2.25}, - {"label": "K23 (B2,C1)", "matrix": [2, 3], "x": 3.75, "y": 2.25}, - {"label": "K24 (B2,C2)", "matrix": [2, 4], "x": 4.75, "y": 2.25}, - {"label": "K25 (B2,C3)", "matrix": [2, 5], "x": 5.75, "y": 2.25}, - {"label": "K26 (B2,C4)", "matrix": [2, 6], "x": 6.75, "y": 2.25}, - {"label": "K27 (B2,C5)", "matrix": [2, 7], "x": 7.75, "y": 2.25}, - {"label": "K37 (B3,C5)", "matrix": [3, 7], "x": 8.75, "y": 2.25}, - {"label": "K28 (B2,C6)", "matrix": [2, 8], "x": 9.75, "y": 2.25}, - {"label": "K29 (B2,C7)", "matrix": [2, 9], "x": 10.75, "y": 2.25}, - {"label": "K2A (B2,D0)", "matrix": [2, 10], "x": 11.75, "y": 2.25}, - {"label": "K2B (B2,D1)", "matrix": [2, 11], "x": 12.75, "y": 2.25}, - {"label": "K2C (B2,D2)", "matrix": [2, 12], "x": 13.75, "y": 2.25}, - {"label": "K2D (B2,D3)", "matrix": [2, 13], "x": 14.75, "y": 2.25, "w": 1.5}, - {"label": "K2E (B2,D4)", "matrix": [2, 14], "x": 16.25, "y": 2.25}, - {"label": "K2F (B2,D5)", "matrix": [2, 15], "x": 17.25, "y": 2.25}, - {"label": "K2G (B2,E1)", "matrix": [2, 16], "x": 18.25, "y": 2.25}, - {"label": "K3H (B3,F5)", "matrix": [3, 17], "x": 19.25, "y": 2.25, "h": 2}, - {"label": "K30 (B3,B6)", "matrix": [3, 0], "x": 0, "y": 3.25}, - {"label": "K31 (B3,B7)", "matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.75}, - {"label": "K32 (B3,C0)", "matrix": [3, 2], "x": 3, "y": 3.25}, - {"label": "K33 (B3,C1)", "matrix": [3, 3], "x": 4, "y": 3.25}, - {"label": "K34 (B3,C2)", "matrix": [3, 4], "x": 5, "y": 3.25}, - {"label": "K35 (B3,C3)", "matrix": [3, 5], "x": 6, "y": 3.25}, - {"label": "K36 (B3,C4)", "matrix": [3, 6], "x": 7, "y": 3.25}, - {"label": "K47 (B4,C5)", "matrix": [4, 7], "x": 8, "y": 3.25}, - {"label": "K38 (B3,C6)", "matrix": [3, 8], "x": 9, "y": 3.25}, - {"label": "K39 (B3,C7)", "matrix": [3, 9], "x": 10, "y": 3.25}, - {"label": "K3A (B3,D0)", "matrix": [3, 10], "x": 11, "y": 3.25}, - {"label": "K3B (B3,D1)", "matrix": [3, 11], "x": 12, "y": 3.25}, - {"label": "K3C (B3,D2)", "matrix": [3, 12], "x": 13, "y": 3.25}, - {"label": "K3D (B3,D3)", "matrix": [3, 13], "x": 14, "y": 3.25, "w": 2.25}, - {"label": "K3E (B3,D4)", "matrix": [3, 14], "x": 16.25, "y": 3.25}, - {"label": "K3F (B3,D5)", "matrix": [3, 15], "x": 17.25, "y": 3.25}, - {"label": "K3G (B3,E1)", "matrix": [3, 16], "x": 18.25, "y": 3.25}, - {"label": "K40 (B4,B6)", "matrix": [4, 0], "x": 0, "y": 4.25}, - {"label": "K41 (B4,B7)", "matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 2.25}, - {"label": "K42 (B4,C0)", "matrix": [4, 2], "x": 3.5, "y": 4.25}, - {"label": "K43 (B4,C1)", "matrix": [4, 3], "x": 4.5, "y": 4.25}, - {"label": "K44 (B4,C2)", "matrix": [4, 4], "x": 5.5, "y": 4.25}, - {"label": "K45 (B4,C3)", "matrix": [4, 5], "x": 6.5, "y": 4.25}, - {"label": "K46 (B4,C4)", "matrix": [4, 6], "x": 7.5, "y": 4.25}, - {"label": "K57 (B5,C5)", "matrix": [5, 7], "x": 8.5, "y": 4.25}, - {"label": "K48 (B4,C6)", "matrix": [4, 8], "x": 9.5, "y": 4.25}, - {"label": "K49 (B4,C7)", "matrix": [4, 9], "x": 10.5, "y": 4.25}, - {"label": "K4A (B4,D0)", "matrix": [4, 10], "x": 11.5, "y": 4.25}, - {"label": "K4B (B4,D1)", "matrix": [4, 11], "x": 12.5, "y": 4.25}, - {"label": "K4C (B4,D2)", "matrix": [4, 12], "x": 13.5, "y": 4.25, "w": 1.75}, - {"label": "K4D (B4,D3)", "matrix": [4, 13], "x": 15.25, "y": 4.25}, - {"label": "K4E (B4,D4)", "matrix": [4, 14], "x": 16.25, "y": 4.25}, - {"label": "K4F (B4,D5)", "matrix": [4, 15], "x": 17.25, "y": 4.25}, - {"label": "K4G (B4,E1)", "matrix": [4, 16], "x": 18.25, "y": 4.25}, - {"label": "K4H (B4,F5)", "matrix": [4, 17], "x": 19.25, "y": 4.25, "h": 2}, - {"label": "K50 (B5,B6)", "matrix": [5, 0], "x": 0, "y": 5.25}, - {"label": "K51 (B5,B7)", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, - {"label": "K52 (B5,C0)", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, - {"label": "K53 (B5,C1)", "matrix": [5, 3], "x": 3.75, "y": 5.25, "w": 1.25}, - {"label": "K56 (B5,C4)", "matrix": [5, 6], "x": 5, "y": 5.25, "w": 6.25}, - {"label": "K5A (B5,D0)", "matrix": [5, 10], "x": 11.25, "y": 5.25}, - {"label": "K5B (B5,D1)", "matrix": [5, 11], "x": 12.25, "y": 5.25}, - {"label": "K5C (B5,D2)", "matrix": [5, 12], "x": 13.25, "y": 5.25}, - {"label": "K5D (B5,D3)", "matrix": [5, 13], "x": 14.25, "y": 5.25}, - {"label": "K5E (B5,D4)", "matrix": [5, 14], "x": 15.25, "y": 5.25}, - {"label": "K5F (B5,D5)", "matrix": [5, 15], "x": 16.25, "y": 5.25}, - {"label": "K5G (B5,E1)", "matrix": [5, 16], "x": 17.25, "y": 5.25}, - {"label": "K5H (B5,F5)", "matrix": [5, 17], "x": 18.25, "y": 5.25} - ] - } - } -} \ No newline at end of file diff --git a/keyboards/uncertainty/test/mcuconf.h b/keyboards/uncertainty/test/mcuconf.h deleted file mode 100644 index 53d967f53473..000000000000 --- a/keyboards/uncertainty/test/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include_next - -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/test/rules.mk b/keyboards/uncertainty/test/rules.mk deleted file mode 100644 index cbaaf52ddd1a..000000000000 --- a/keyboards/uncertainty/test/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm - -# using external i2c eeprom -EEPROM_DRIVER = i2c - -# using SSD1306 OLED driver -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled - -# using rotary encoder -# ENCODER_ENABLE = yes From c3695a91ecc911f05987d1e0ae8ff537ddc4b53b Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:02:33 +0700 Subject: [PATCH 27/46] v0.1: change directory --- keyboards/uncertainty/config.h | 68 --- keyboards/uncertainty/halconf.h | 11 - keyboards/uncertainty/info.json | 163 ------ keyboards/uncertainty/keymaps/default/bongo.h | 514 ------------------ .../uncertainty/keymaps/default/keymap.c | 168 ------ .../uncertainty/keymaps/default/rules.mk | 2 - keyboards/uncertainty/mcuconf.h | 10 - keyboards/uncertainty/readme.md | 27 - keyboards/uncertainty/rules.mk | 10 - .../{ => vinhcatba}/uncertainty/kipythonlog | 0 .../{ => vinhcatba}/uncertainty/placefp.py | 0 lib/chibios | 2 +- 12 files changed, 1 insertion(+), 974 deletions(-) delete mode 100644 keyboards/uncertainty/config.h delete mode 100644 keyboards/uncertainty/halconf.h delete mode 100644 keyboards/uncertainty/info.json delete mode 100644 keyboards/uncertainty/keymaps/default/bongo.h delete mode 100644 keyboards/uncertainty/keymaps/default/keymap.c delete mode 100644 keyboards/uncertainty/keymaps/default/rules.mk delete mode 100644 keyboards/uncertainty/mcuconf.h delete mode 100644 keyboards/uncertainty/readme.md delete mode 100644 keyboards/uncertainty/rules.mk rename keyboards/{ => vinhcatba}/uncertainty/kipythonlog (100%) rename keyboards/{ => vinhcatba}/uncertainty/placefp.py (100%) diff --git a/keyboards/uncertainty/config.h b/keyboards/uncertainty/config.h deleted file mode 100644 index 79407df65bd2..000000000000 --- a/keyboards/uncertainty/config.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* WS2812 driver config specifically for STM32F401 */ - -// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM - - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 - - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF -#endif - -#define DEBUG_EEPROM_OUTPUT - -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 - -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -/* eeprom i2c driver config */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 -#define EXTERNAL_EEPROM_BYTE_COUNT 4096 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_WRITE_TIME 10 -//#define EEPROM_I2C_24LC32 - -/* OLED config */ -#ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 -#define OLED_UPDATE_INTERVAL 100 -#define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - -#endif diff --git a/keyboards/uncertainty/halconf.h b/keyboards/uncertainty/halconf.h deleted file mode 100644 index 84921df44339..000000000000 --- a/keyboards/uncertainty/halconf.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif - -#undef HAL_USE_I2C -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/uncertainty/info.json b/keyboards/uncertainty/info.json deleted file mode 100644 index a2e643068e17..000000000000 --- a/keyboards/uncertainty/info.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", - "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - - "diode_direction": "COL2ROW", - "features": { - "bootmagic": true, - "command": true, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgblight": true - }, - "matrix_pins": { - "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], - "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] - }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0xFEED" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } - ] - }, - "rgblight": { - "led_count": 14, - "pin": "B1", - "sleep": true, - "max_brightness": 255, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, - "animations": { - "all": true, - "knight": true, - "rainbow_mood": true, - "rgb_test": true - } - }, - - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, - {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, - {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, - {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, - {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, - {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, - {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, - {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, - {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, - {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, - {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, - {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, - {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, - {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, - {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, - {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, - {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, - {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, - {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, - {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, - {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, - {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, - {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, - {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, - {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, - {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, - {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, - {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, - {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, - {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, - {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, - {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, - {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, - {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, - {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, - {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, - {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, - {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, - {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, - {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, - {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, - {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, - {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, - {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, - {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, - {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, - {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, - {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, - {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, - {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, - {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, - {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, - {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, - {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, - {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, - {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, - {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, - {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, - {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, - {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, - {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, - {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, - {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, - {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, - {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, - {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, - {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, - {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, - {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, - {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, - {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, - {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, - {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, - {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, - {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, - {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, - {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, - {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, - {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, - {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, - {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, - {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, - {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, - {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, - {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, - {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, - {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, - {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, - {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, - {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, - {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, - {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, - {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, - {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, - {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, - {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, - {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, - {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, - {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, - {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, - {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, - {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, - {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, - {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} - ] - } - } -} diff --git a/keyboards/uncertainty/keymaps/default/bongo.h b/keyboards/uncertainty/keymaps/default/bongo.h deleted file mode 100644 index 442ef5666a76..000000000000 --- a/keyboards/uncertainty/keymaps/default/bongo.h +++ /dev/null @@ -1,514 +0,0 @@ -#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms -#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 -#define IDLE_FRAMES 5 -#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle -#define TAP_FRAMES 2 -#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? - -enum anim_states -{ - Idle, - Prep, - Tap -}; -uint8_t anim_state = Idle; -uint32_t idle_timeout_timer = 0; -uint32_t anim_timer = 0; -uint8_t current_idle_frame = 0; -uint8_t current_tap_frame = 0; - -struct pair_int_int -{ - uint8_t first; - uint8_t second; -}; -struct pair_int_int pressed_keys[KEYS_SIZE]; -struct pair_int_int pressed_keys_prev[KEYS_SIZE]; -uint8_t pressed_keys_index = 0; - -bool key_down = 0; -char wpm[42]; - -static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, -}; - -static const char PROGMEM prep[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM prep_minimal[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, - 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, - 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -bool detect_key_down(void) -{ - // store the previous cycle's cache - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - pressed_keys_prev[i].first = pressed_keys[i].first; - pressed_keys_prev[i].second = pressed_keys[i].second; - } - - // fill cache with currently pressed keys - pressed_keys_index = 0; - for (uint8_t x = 0; x < MATRIX_ROWS; x++) - { - for (uint8_t y = 0; y < MATRIX_COLS; y++) - { - // is this key is currently down? - if (((matrix_get_row(x) & (1 << y)) > 0)) - { - pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check - pressed_keys[pressed_keys_index].second = y+1; - } - else - { - pressed_keys[pressed_keys_index].first = 0; - pressed_keys[pressed_keys_index].second = 0; - } - pressed_keys_index++; - } - } - - // check for a new key down compared to last cycle - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) - { - return true; - } - } - return false; -} - -void eval_anim_state(void) -{ - key_down = detect_key_down(); - - switch (anim_state) - { - case Idle: - if (key_down) // Idle to Tap - { - anim_state = Tap; - } - break; - - case Prep: - if (key_down) // Prep to Tap - { - anim_state = Tap; - } - else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle - { - anim_state = Idle; - current_idle_frame = 0; - } - break; - - case Tap: - if (!key_down) // Tap to Prep - { - anim_state = Prep; - idle_timeout_timer = timer_read32(); - } - break; - - default: - break; - } -} - -static void draw_bongo(bool minimal) -{ - eval_anim_state(); - - oled_set_cursor(0, 0); - - switch (anim_state) - { - case Idle: - if (minimal) - oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - else - oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) - { - current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; - anim_timer = timer_read32(); - } - break; - - case Prep: - if (minimal) - oled_write_raw_P(prep_minimal[0], ANIM_SIZE); - else - oled_write_raw_P(prep[0], ANIM_SIZE); - break; - - case Tap: - if (minimal) - oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - else - oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; - break; - - default: - break; - } - - if (!minimal) - { - // print wpm - oled_set_cursor(0, 0); - sprintf(wpm, "WPM:%03d", get_current_wpm()); - oled_write(wpm, false); - - // // calculate && print clock - // oled_set_cursor(0, 2); - // uint8_t hour = last_minute / 60; - // uint16_t minute = last_minute % 60; - // bool is_pm = (hour / 12) > 0; - // hour = hour % 12; - // if (hour == 0) { - // hour = 12; - // } - // static char time_str[8] = ""; - // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); - // oled_write(time_str, false); - } -} diff --git a/keyboards/uncertainty/keymaps/default/keymap.c b/keyboards/uncertainty/keymaps/default/keymap.c deleted file mode 100644 index 141dea017066..000000000000 --- a/keyboards/uncertainty/keymaps/default/keymap.c +++ /dev/null @@ -1,168 +0,0 @@ -#include "keycodes.h" -#include QMK_KEYBOARD_H - - -#include "print.h" -#include - -#define BONGO_ENABLE -#ifdef BONGO_ENABLE -#include "bongo.h" -#endif - -char wpm_str[10]; - -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -user_config_t user_config; -/* TODO: add layers, add macro */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* 0 - * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PrtScn│ Del │ Home │ End │ PgUp │ PgDn │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┤ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │ # Lk │ / │ * │ - │ - * ┌──────┼──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬─────────┼──────┼──────┼──────┼──────┤ - * │ Mute │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ 7 │ 8 │ 9 │ │ - * ├──────┼──────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─────────┼──────┼──────┼──────┤ + | - * │ Null │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ | - * ├──────┼────────────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴─┬────┴───────┬──────┼──────┤──────┼──────┼──────┤ - * │ Null │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │ Up │ 1 │ 2 │ 3 │ │ - * ├──────┼───────┬──────┴┬─────┴─┬────┴──────┴──────┴──────┴──────┴──────┴─────┬┴─────┬┴─────┬┴─────┬──────┼──────┼──────┼──────┼──────┤ Entr | - * │ Null │ Ctrl │ Gui │ Alt │ Space │ Alt │ Fn │ Ctrl │ Left │ Down │ Right│ 0 │ . │ │ - * └──────┴───────┴───────┴───────┴─────────────────────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - */ - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, - KC_GRV, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS, - KC_MUTE, 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, KC_P7, KC_P8, KC_P9, KC_PPLS, - RGB_MOD, 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_P4, KC_P5, KC_P6, - C(KC_V), 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_P1, KC_P2, KC_P3, KC_PENT, - C(KC_C), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ), - [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - C(KC_C), _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - -#ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } -}; -#endif - -#ifdef RGBLIGHT_ENABLE -#define HSV_PASTEL_BLUE 150, 155, 51 -// Light LEDs 0 red when caps lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 -); - -// Light LEDs 1 red when num lock is active. Hard to ignore! -const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 -); - -const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - indicators_off_layer, - my_capslock_layer, - my_numlock_layer -); - - -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(1, led_state.caps_lock); - rgblight_set_layer_state(2, led_state.num_lock); - return true; -} - -void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; - - // Enable the LED layers - rgblight_layers = my_rgb_layers; - rgblight_set_layer_state(0, 1); - // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); - rgblight_set_effect_range(2, 12); - - rgblight_enable(); - //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_MOD: - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } -#ifdef OLED_ENABLE - -/* TODO: update bongo cat animation */ -// Used to draw on to the oled screen -bool oled_task_user(void) { - draw_bongo(true); - return false; -} -#endif diff --git a/keyboards/uncertainty/keymaps/default/rules.mk b/keyboards/uncertainty/keymaps/default/rules.mk deleted file mode 100644 index c922e471fa86..000000000000 --- a/keyboards/uncertainty/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -ENCODER_MAP_ENABLE = yes -OLED_ENABLE = yes diff --git a/keyboards/uncertainty/mcuconf.h b/keyboards/uncertainty/mcuconf.h deleted file mode 100644 index 53d967f53473..000000000000 --- a/keyboards/uncertainty/mcuconf.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include_next - -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/uncertainty/readme.md b/keyboards/uncertainty/readme.md deleted file mode 100644 index cd3c36958e06..000000000000 --- a/keyboards/uncertainty/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# uncertainty - -![uncertainty](imgur.com image replace me!) - -*A short description of the keyboard/project* - -* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) -* Hardware Supported: *The PCBs, controllers supported* -* Hardware Availability: *Links to where you can find this hardware* - -Make example for this keyboard (after setting up your build environment): - - make uncertainty:default - -Flashing example for this keyboard: - - make uncertainty:default:flash - -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). - -## Bootloader - -Enter the bootloader in 3 ways: - -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/uncertainty/rules.mk b/keyboards/uncertainty/rules.mk deleted file mode 100644 index 6b7648feb02f..000000000000 --- a/keyboards/uncertainty/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm - -# using external i2c eeprom -EEPROM_DRIVER = i2c - -# using SSD1306 OLED driver -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file diff --git a/keyboards/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog similarity index 100% rename from keyboards/uncertainty/kipythonlog rename to keyboards/vinhcatba/uncertainty/kipythonlog diff --git a/keyboards/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py similarity index 100% rename from keyboards/uncertainty/placefp.py rename to keyboards/vinhcatba/uncertainty/placefp.py diff --git a/lib/chibios b/lib/chibios index 11edb1610980..0062927e3058 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 11edb1610980f213b9f83161e1715a46fb7e4c51 +Subproject commit 0062927e3058a8b5ef587234bbd98d42fb4e595e From 5d2342d6b8d25b6d437eda3d851b4c308fc5472f Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 27 May 2023 02:04:02 +0700 Subject: [PATCH 28/46] v0.1: cleanup --- keyboards/vinhcatba/uncertainty/kipythonlog | 1667 ------------------- keyboards/vinhcatba/uncertainty/placefp.py | 55 - 2 files changed, 1722 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/kipythonlog delete mode 100644 keyboards/vinhcatba/uncertainty/placefp.py diff --git a/keyboards/vinhcatba/uncertainty/kipythonlog b/keyboards/vinhcatba/uncertainty/kipythonlog deleted file mode 100644 index 7883889b77ec..000000000000 --- a/keyboards/vinhcatba/uncertainty/kipythonlog +++ /dev/null @@ -1,1667 +0,0 @@ -Py 0.9.8 -Python 3.9.10 (main, Jul 19 2022, 05:36:50) [MSC v.1932 64 bit (AMD64)] on win32 -Type "help", "copyright", "credits" or "license" for more information. -Startup script executed: C:\Users\ADMIN\AppData\Roaming\kicad\6.0\PyShell_pcbnew_startup.py - -import pcbnew -pcbnew.GetBoard() - > -myboard = pcbnew.GetBoard() -for fp in myboard.GetFootprints(): - print(fp.GetReference()) - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -footprints = myboard.GetFootprints() -printf(footprints[0]) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'printf' is not defined -print(footprints[0]) -::value_type' at 0x00000218643C36F0> > -print(footprints[0].GetReference()) -D88 -print(footprints[0].fp_id) -Traceback (most recent call last): - File "", line 1, in -AttributeError: 'FOOTPRINT' object has no attribute 'fp_id' -selected = [x.GetReference() for x in myboard.GetFootprints() if x.IsSelected()] -print(selected) -['D15'] -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) -... - File "", line 5 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - fi -... - File "", line 6 - ... - ^ -SyntaxError: invalid syntax -for fp in footprints: - if fp.ref == selected: - ref_fp = fp - print(ref_fp) - - -Traceback (most recent call last): - File "", line 2, in -AttributeError: 'FOOTPRINT' object has no attribute 'ref' -for fp in footprints: - try: - sheet_file = fp.GetProperty('Sheetfile') - # construct a list of all the footprints - mod_named_tuple = Footprint(fp=fp, - fp_id=self.get_footprint_id(fp), - sheet_id=self.get_sheet_path(fp)[0], - filename=self.get_sheet_path(fp)[1], - ref=fp.GetReference()) - self.footprints.append(mod_named_tuple) - except KeyError: - pass - pass - File "", line 13 - pass - ^ -IndentationError: unindent does not match any outer indentation level -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - File "", line 1 - fp_list = [] - ^ -SyntaxError: multiple statements found while compiling a single statement -fp_list = [] -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass -pass - File "", line 7 - pass - ^ -SyntaxError: invalid syntax -for fp in footprints: - try: - named_tuple = Footprint(fp=fp,fp_id=self.get_footprint_id(fp),sheet_id=self.get_sheet_path(fp)[0],filename=self.get_sheet_path(fp)[1],ref=fpGetReference()) - fp_list.append(named_tuple) - except KeyError: - pass - - -Traceback (most recent call last): - File "", line 3, in -NameError: name 'Footprint' is not defined -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) -Traceback (most recent call last): - File "", line 1, in -NameError: name 'fp_id' is not defined -fp_id = "" -for fp in footprints: - if fp.GetReference() == selected: - path = footprint.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - - -print(fp_id) - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - - -for fp in footprints: - if fp.GetReference() == selected: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D88 -SW52 -D83 -D47 -C4 -SW91 -SW65 -SW14 -SW53 -D42 -D78 -SW4 -SW25 -D45 -D23 -D33 -C11 -SW36 -D24 -SW37 -SW33 -SW74 -REF** -D5 -D90 -SW81 -D86 -SW13 -SW92 -D15 -D70 -SW93 -D114 -D63 -SW72 -D93 -SW58 -D29 -D40 -D84 -SW76 -D3 -REF** -D37 -D95 -D52 -SW21 -D76 -SW90 -D39 -J1 -D1 -D46 -SW85 -D55 -D21 -SW17 -D34 -SW57 -SW43 -D98 -SW12 -SW38 -SW47 -D92 -D58 -D8 -SW97 -SW35 -SW102 -D18 -D74 -SW56 -SW34 -SW11 -D91 -SW103 -SW45 -D73 -D49 -D32 -SW78 -C7 -SW46 -D44 -D87 -SW66 -REF** -SW42 -SW55 -D51 -SW61 -C6 -R4 -D61 -D14 -SW101 -D20 -D97 -SW9 -D67 -SW50 -D59 -C5 -SW68 -SW63 -SW77 -C3 -D77 -SW6 -C1 -D30 -C2 -D57 -SW89 -SW86 -SW3 -REF** -SW75 -SW40 -D27 -D85 -SW39 -SW8 -SW87 -D19 -SW31 -D82 -D100 -U1 -D17 -SW20 -SW62 -SW71 -SW99 -D115 -D9 -D105 -SW29 -D72 -D68 -SW24 -SW60 -SW22 -D13 -SW26 -SW30 -SW100 -SW84 -SW104 -D80 -REF** -D16 -D101 -R5 -D50 -SW83 -D4 -SW98 -SW59 -D48 -D103 -SW23 -D62 -REF** -J2 -D66 -D25 -SW51 -D96 -U2 -C8 -SW37B1 -D102 -SW41 -SW64 -SW18 -SW28 -SW37B1 -D64 -SW80 -D69 -D75 -D104 -D12 -SW82 -SW32 -SW1 -D35 -C10 -D38 -SW79 -SW48 -SW96 -D53 -SW44 -D71 -SW94 -SW15 -D65 -D56 -D99 -SW54 -R2 -SW19 -SW27 -SW70 -D31 -D81 -SW49 -D10 -SW88 -C9 -SW16 -D2 -D22 -D43 -SW10 -R3 -D54 -D6 -D89 -D26 -SW95 -SW73 -R1 -D11 -D94 -D41 -D79 -D60 -D28 -SW67 -SW69 -SW2 -D7 -D36 -SW5 -SW7 -C12 -D108 -D111 -D110 -D106 -D109 -C13 -D107 -D112 -D113 -print(selected) -['D15'] -selected -['D15'] -selected[0] -'D15' -for fp in footprints: - if fp.GetReference() == selected[0]: - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - print(fp.GetReference()) - - -D15 -print(fp_id) -D51D642D-4C52-4D3C-BA63-D62449DDB306 -def get_fp_id(fp): - path = fp.GetPath().AsString().upper().replace('00000000-0000-0000-0000-0000', '').split("/") - if len(path) != 1: - fp_id = path[-1] - else: - fp_id = None - return fp_id - - -for fp in footprints: - if get_fp_id(fp) == fp_id: - print(fp.GetReference()) - - - -D15 -def get_fp_diode(footprints): - diode_list = [] - - - -diode_list = [] -for fp in footprints: - ref = fp.GetReference() - if ref[0] == 'D': - diode_list.append(fp) - - -print(diode_list) -[::value_type' at 0x00000218643C36F0> >, ::value_type' at 0x00000218643C35A0> >, ::value_type' at 0x00000218643C3780> >, ::value_type' at 0x00000218643C3B10> >, ::value_type' at 0x00000218643C3AE0> >, ::value_type' at 0x00000218643C3DE0> >, ::value_type' at 0x00000218643C3DB0> >, ::value_type' at 0x00000218643C3F00> >, ::value_type' at 0x0000021864308600> >, ::value_type' at 0x00000218643083C0> >, ::value_type' at 0x0000021864308090> >, ::value_type' at 0x0000021864308630> >, ::value_type' at 0x0000021864308480> >, ::value_type' at 0x0000021864308BD0> >, ::value_type' at 0x0000021865CD84E0> >, ::value_type' at 0x0000021865CD8210> >, ::value_type' at 0x0000021865CD8090> >, ::value_type' at 0x000002186329C7B0> >, ::value_type' at 0x000002186329C960> >, ::value_type' at 0x000002186329CB40> >, ::value_type' at 0x000002186329C1E0> >, ::value_type' at 0x000002186329C5A0> >, ::value_type' at 0x000002186329CF60> >, ::value_type' at 0x000002186329C420> >, ::value_type' at 0x000002186329C360> >, ::value_type' at 0x000002186329C060> >, ::value_type' at 0x0000021865CCE4B0> >, ::value_type' at 0x0000021865CCEBA0> >, ::value_type' at 0x0000021865CCE570> >, ::value_type' at 0x0000021865CCE1E0> >, ::value_type' at 0x0000021865CCE180> >, ::value_type' at 0x0000021865CCE030> >, ::value_type' at 0x0000021806033270> >, ::value_type' at 0x0000021806033300> >, ::value_type' at 0x0000021806033390> >, ::value_type' at 0x00000218060335D0> >, ::value_type' at 0x0000021806033660> >, ::value_type' at 0x00000218060338A0> >, ::value_type' at 0x0000021806033A50> >, ::value_type' at 0x0000021806033AE0> >, ::value_type' at 0x0000021806033BD0> >, ::value_type' at 0x0000021806033E10> >, ::value_type' at 0x0000021806033EA0> >, ::value_type' at 0x000002180603F1B0> >, ::value_type' at 0x000002180603F3F0> >, ::value_type' at 0x000002180603F480> >, ::value_type' at 0x000002180603F5A0> >, ::value_type' at 0x000002180603F630> >, ::value_type' at 0x000002180603F750> >, ::value_type' at 0x000002180603F870> >, ::value_type' at 0x000002180603FBD0> >, ::value_type' at 0x000002180603FD80> >, ::value_type' at 0x000002180603FEA0> >, ::value_type' at 0x000002180604F300> >, ::value_type' at 0x000002180604F390> >, ::value_type' at 0x000002180604F5D0> >, ::value_type' at 0x000002180604F6F0> >, ::value_type' at 0x000002180604F780> >, ::value_type' at 0x000002180604F8A0> >, ::value_type' at 0x000002180604FB70> >, ::value_type' at 0x000002180604FC00> >, ::value_type' at 0x000002180604FC90> >, ::value_type' at 0x000002180604FDB0> >, ::value_type' at 0x000002180604FE40> >, ::value_type' at 0x00000218060350C0> >, ::value_type' at 0x0000021806035420> >, ::value_type' at 0x0000021806035540> >, ::value_type' at 0x00000218060355D0> >, ::value_type' at 0x00000218060356F0> >, ::value_type' at 0x0000021806035810> >, ::value_type' at 0x00000218060359C0> >, ::value_type' at 0x0000021806035A50> >, ::value_type' at 0x0000021806035B70> >, ::value_type' at 0x0000021806035D20> >, ::value_type' at 0x0000021806035DB0> >, ::value_type' at 0x0000021806035ED0> >, ::value_type' at 0x0000021806034150> >, ::value_type' at 0x00000218060344B0> >, ::value_type' at 0x00000218060345D0> >, ::value_type' at 0x0000021806034660> >, ::value_type' at 0x00000218060346F0> >, ::value_type' at 0x0000021806034780> >, ::value_type' at 0x00000218060349C0> >, ::value_type' at 0x0000021806034AE0> >, ::value_type' at 0x0000021806034D20> >, ::value_type' at 0x0000021806034E40> >, ::value_type' at 0x0000021806034FC0> >, ::value_type' at 0x00000218060310C0> >, ::value_type' at 0x0000021806031150> >, ::value_type' at 0x00000218060314B0> >, ::value_type' at 0x0000021806031540> >, ::value_type' at 0x0000021806031660> >, ::value_type' at 0x00000218060318A0> >, ::value_type' at 0x0000021806031930> >, ::value_type' at 0x00000218060319C0> >, ::value_type' at 0x0000021806031B70> >, ::value_type' at 0x0000021806031C00> >, ::value_type' at 0x0000021806031C90> >, ::value_type' at 0x0000021806031D20> >, ::value_type' at 0x0000021806031F60> >, ::value_type' at 0x0000021806031FC0> >, ::value_type' at 0x00000218060410C0> >, ::value_type' at 0x0000021806041150> >, ::value_type' at 0x00000218060411E0> >, ::value_type' at 0x0000021806041270> >, ::value_type' at 0x00000218060414B0> >, ::value_type' at 0x0000021806041540> >, ::value_type' at 0x0000021806041780> >, ::value_type' at 0x0000021806041810> >, ::value_type' at 0x00000218060418A0> >, ::value_type' at 0x0000021806041930> >, ::value_type' at 0x00000218060419C0> >, ::value_type' at 0x0000021806041AE0> >, ::value_type' at 0x0000021806041B70> >, ::value_type' at 0x0000021806041C00> >] -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort - -diode_list.sort() -for fp in diode_list print(fp.GetReference()) - File "", line 1 - for fp in diode_list print(fp.GetReference()) - ^ -SyntaxError: invalid syntax -for fp in diode_list: print(fp.GetReference()) - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -diode_list.sort() -for fp in diode_list: - print(fp.GetReference()) - - -D88 -D83 -D47 -D42 -D78 -D45 -D23 -D33 -D24 -D5 -D90 -D86 -D15 -D70 -D114 -D63 -D93 -D29 -D40 -D84 -D3 -D37 -D95 -D52 -D76 -D39 -D1 -D46 -D55 -D21 -D34 -D98 -D92 -D58 -D8 -D18 -D74 -D91 -D73 -D49 -D32 -D44 -D87 -D51 -D61 -D14 -D20 -D97 -D67 -D59 -D77 -D30 -D57 -D27 -D85 -D19 -D82 -D100 -D17 -D115 -D9 -D105 -D72 -D68 -D13 -D80 -D16 -D101 -D50 -D4 -D48 -D103 -D62 -D66 -D25 -D96 -D102 -D64 -D69 -D75 -D104 -D12 -D35 -D38 -D53 -D71 -D65 -D56 -D99 -D31 -D81 -D10 -D2 -D22 -D43 -D54 -D6 -D89 -D26 -D11 -D94 -D41 -D79 -D60 -D28 -D7 -D36 -D108 -D111 -D110 -D106 -D109 -D107 -D112 -D113 -def sortByRef(e): - return e.GetReference() - - -diode_list.sort(key=sortByRef) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D10 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D11 -D110 -D111 -D112 -D113 -D114 -D115 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D2 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D3 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D4 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D5 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D6 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D7 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D8 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D9 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -def sortByRefNew(e): - ref = e.GetReference() - return int(ref[1:]) - - -diode_list.sort(key=sortByRefNew) -for fp in diode_list: - print(fp.GetReference()) - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -D106 -D107 -D108 -D109 -D110 -D111 -D112 -D113 -D114 -D115 -def fp_set_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.SetBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.SetBrightened() - - - - -for i in range(diode_list): - fp_set_highlight(diode_list[i]) - i = i + 17 - - -Traceback (most recent call last): - File "", line 1, in -TypeError: 'list' object cannot be interpreted as an integer -for col in range(0,105): - fp_set_highlight(diode_list[col]) - col = col + 17 - - -pcbnew.Refresh() -for col in range(0,105): - print(diode_list[col].GetReference()) - col = col + 17 - - -D1 -D2 -D3 -D4 -D5 -D6 -D7 -D8 -D9 -D10 -D11 -D12 -D13 -D14 -D15 -D16 -D17 -D18 -D19 -D20 -D21 -D22 -D23 -D24 -D25 -D26 -D27 -D28 -D29 -D30 -D31 -D32 -D33 -D34 -D35 -D36 -D37 -D38 -D39 -D40 -D41 -D42 -D43 -D44 -D45 -D46 -D47 -D48 -D49 -D50 -D51 -D52 -D53 -D54 -D55 -D56 -D57 -D58 -D59 -D60 -D61 -D62 -D63 -D64 -D65 -D66 -D67 -D68 -D69 -D70 -D71 -D72 -D73 -D74 -D75 -D76 -D77 -D78 -D79 -D80 -D81 -D82 -D83 -D84 -D85 -D86 -D87 -D88 -D89 -D90 -D91 -D92 -D93 -D94 -D95 -D96 -D97 -D98 -D99 -D100 -D101 -D102 -D103 -D104 -D105 -for i in range(0,105,17): - print(diode_list[i].GetReference()) - - -D1 -D18 -D35 -D52 -D69 -D86 -D103 -for i in range(0,105,18): - print(diode_list[i].GetReference()) - . - - File "", line 3 - . - ^ -SyntaxError: invalid syntax -for i in range(0,105,18): - print(diode_list[i].GetReference()) - - -D1 -D19 -D37 -D55 -D73 -D91 -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def fp_clear_highlight(fp): - pads_list = fp.Pads() - for pad in pads_list: - pad.ClearBrightened() - drawings = fp.GraphicalItems() - for item in drawings: - item.ClearBrightened() - -for fp in diode_list: - fp_clear_highlight(fp) - -pcbnew.Refresh() -for i in range(0,105,18): - fp_set_highlight(diode_list[i]) - -pcbnew.Refresh() -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -fp_to_place = [] -for i in range(0,105,18): - fp_to_place.append(diode_list[i]) - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, reference_footprint, step_x, step_y, step, rotation, copy_text_items): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - - -place_linear(fp_to_place, fp_to_place[0], 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in -TypeError: place_linear() missing 1 required positional argument: 'copy_text_items' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 10, in place_linear -AttributeError: 'list' object has no attribute 'GetPosition' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.fp.IsFlipped() != ref_fp.IsFlipped(): - fp.fp.Flip(fp.fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 17, in place_linear -AttributeError: 'FOOTPRINT' object has no attribute 'fp' -def place_linear(footprints_to_place, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 20, in place_linear -NameError: name 'SCALE' is not defined -SCALE = 1000000.0 -place_linear(fp_to_place, 3, 0, 0, 0) -Traceback (most recent call last): - File "", line 1, in - File "", line 24, in place_linear -ZeroDivisionError: integer division or modulo by zero -place_linear(fp_to_place, 3, 0, 1, 0) -pcbnew.Refresh() diff --git a/keyboards/vinhcatba/uncertainty/placefp.py b/keyboards/vinhcatba/uncertainty/placefp.py deleted file mode 100644 index dc5954624e4c..000000000000 --- a/keyboards/vinhcatba/uncertainty/placefp.py +++ /dev/null @@ -1,55 +0,0 @@ -import pcbnew - -SCALE = 1000000.0 -board = pcbnew.GetBoard() - -def place_linear(footprints_to_place, ref_fp, step_x, step_y, step, rotation): - # get proper footprint list - footprints = [] - for fp in footprints_to_place: - footprints.append(fp) - - #ref_fp = footprints_to_place[0] - - # get reference footprint position - ref_fp_pos = ref_fp.GetPosition() - ref_fp_index = -1 #footprints.index(ref_fp) - - for fp in footprints: - index = footprints.index(fp) - delta_index = index-ref_fp_index - - if fp.IsFlipped() != ref_fp.IsFlipped(): - fp.Flip(fp.GetPosition(), False) - - new_position = (ref_fp_pos.x + delta_index*step_x*SCALE, ref_fp_pos.y + delta_index*step_y * SCALE) - new_position = [int(x) for x in new_position] - fp.SetPosition(pcbnew.wxPoint(*new_position)) - footprint_angle = ref_fp.GetOrientationDegrees() - footprint_angle = footprint_angle + index // step * rotation - fp.SetOrientationDegrees(footprint_angle) - -def place_matrix(footprints_to_place, ref_fp, step_x, step_y, col): - #row = len(footprints_to_place) / col - - #matrix = [footprints_to_place[i:i + col] for i in range(0, len(footprints_to_place), col)] - #first row - place_linear(footprints_to_place[:col], ref_fp, step_x, 0, 1, 0) - for i in range(col): - place_linear(footprints_to_place[i+col::col], footprints_to_place[i], 0, step_y, 1, 0) - pcbnew.Refresh() - -def get_selected(): - #get list of selected fp - selected = [x for x in board.GetFootprints() if x.IsSelected()] - return selected - #fp_to_place.sort(key=sortByRefNew, reverse=isReverse) -def sort_by_ref(fpList, reversed=False): - str = fpList[0].GetReference() - for i, char in enumerate(str): - # Checking if char is numeric - if char.isdigit(): - index = i - break - fpList.sort(key=lambda x: int(x.GetReference()[index:]), reverse=reversed) - return fpList From 0c2be5aaa328c60a2be2a9667edc25d23d4a7750 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Mon, 29 May 2023 17:14:19 +0700 Subject: [PATCH 29/46] v0.3: change keyboard name, remove eeprom config save in VIA keymap --- keyboards/vinhcatba/uncertainty/info.json | 14 +++-- .../uncertainty/keymaps/via/keymap.c | 62 +------------------ 2 files changed, 11 insertions(+), 65 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 7364a9bbc422..a2af3f3c8db8 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -1,6 +1,6 @@ { - "manufacturer": "Thanh Vinh", - "keyboard_name": "uncertainty", + "manufacturer": "Vinh Le", + "keyboard_name": "vinhcatba Uncertainty", "maintainer": "vinhcatba", "processor": "STM32F401", "bootloader": "stm32-dfu", @@ -43,10 +43,16 @@ "override_rgb": true }, "animations": { - "all": true, + "alternating": true, + "breathing": true, + "christmas": true, "knight": true, "rainbow_mood": true, - "rgb_test": true + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true } }, diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 06bafdb4541a..7e490a91bca5 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -12,14 +12,6 @@ char wpm_str[10]; -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -user_config_t user_config; /* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -104,7 +96,6 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( my_numlock_layer ); - bool led_update_user(led_t led_state) { rgblight_set_layer_state(1, led_state.caps_lock); rgblight_set_layer_state(2, led_state.num_lock); @@ -118,63 +109,12 @@ void keyboard_post_init_user(void) { // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); - // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); rgblight_set_effect_range(2, 12); rgblight_enable(); - //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_MOD: - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } } +#endif // end RGBLIGHT_ENABLE -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } #ifdef OLED_ENABLE /* TODO: update bongo cat animation */ From a3b0afeef02bc0d017587f325b68ab491794fd05 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 6 Jun 2023 18:23:27 +0700 Subject: [PATCH 30/46] cleanup for PR --- keyboards/vinhcatba/uncertainty/config.h | 15 +-- keyboards/vinhcatba/uncertainty/info.json | 2 +- .../uncertainty/keymaps/default/bongo.h | 16 +--- .../uncertainty/keymaps/default/keymap.c | 96 +++---------------- .../uncertainty/keymaps/default/rules.mk | 2 - .../vinhcatba/uncertainty/keymaps/via/bongo.h | 16 +--- .../uncertainty/keymaps/via/keymap.c | 33 +++---- .../uncertainty/keymaps/via/rules.mk | 4 +- keyboards/vinhcatba/uncertainty/readme.md | 4 +- keyboards/vinhcatba/uncertainty/rules.mk | 3 +- 10 files changed, 40 insertions(+), 151 deletions(-) delete mode 100644 keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index 79407df65bd2..d28428080622 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -1,4 +1,4 @@ -// Copyright 2022 Thanh Vinh (@vinhcatba) +// Copyright 2023 Vinh Le (@vinhcatba) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -23,7 +23,7 @@ // DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) #ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // 5 = CAPS; 6 = NUM + #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM #define WS2812_PWM_DRIVER PWMD3 // TIM3 #define WS2812_PWM_CHANNEL 4 // CH4 @@ -31,13 +31,8 @@ #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) - - // #define RGBLIGHT_LAYERS - // #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF #endif -#define DEBUG_EEPROM_OUTPUT - /* i2c peripheral config */ #define I2C_DRIVER I2CD1 #define I2C1_SCL_PIN B6 @@ -57,12 +52,6 @@ /* OLED config */ #ifdef OLED_ENABLE -// #define OLED_IC OLED_IC_SH1106 -// #define OLED_COLUMN_OFFSET 2 - -// #define OLED_DISPLAY_128X64 #define OLED_UPDATE_INTERVAL 100 #define OLED_BRIGHTNESS 200 -//#define OLED_DISPLAY_ADDRESS 0x3C - #endif diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index a2af3f3c8db8..57e9542100d7 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -1,6 +1,6 @@ { "manufacturer": "Vinh Le", - "keyboard_name": "vinhcatba Uncertainty", + "keyboard_name": "Uncertainty", "maintainer": "vinhcatba", "processor": "STM32F401", "bootloader": "stm32-dfu", diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h index 442ef5666a76..346377a02e8c 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h @@ -1,3 +1,6 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms #define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 #define IDLE_FRAMES 5 @@ -497,18 +500,5 @@ static void draw_bongo(bool minimal) oled_set_cursor(0, 0); sprintf(wpm, "WPM:%03d", get_current_wpm()); oled_write(wpm, false); - - // // calculate && print clock - // oled_set_cursor(0, 2); - // uint8_t hour = last_minute / 60; - // uint16_t minute = last_minute % 60; - // bool is_pm = (hour / 12) > 0; - // hour = hour % 12; - // if (hour == 0) { - // hour = 12; - // } - // static char time_str[8] = ""; - // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); - // oled_write(time_str, false); } } diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 06bafdb4541a..013343663992 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -1,26 +1,12 @@ -#include "keycodes.h" -#include QMK_KEYBOARD_H - +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "keycodes.h" #include "print.h" #include - -#define BONGO_ENABLE -#ifdef BONGO_ENABLE #include "bongo.h" -#endif -char wpm_str[10]; - -typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - }; -} user_config_t; - -user_config_t user_config; -/* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 @@ -79,22 +65,21 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; -#endif +#endif // endif ENCODER_MAP_ENABLE #ifdef RGBLIGHT_ENABLE #define HSV_PASTEL_BLUE 150, 155, 51 -// Light LEDs 0 red when caps lock is active. Hard to ignore! + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 0 ); -// Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 + {0, 2, HSV_OFF} // Turn off 2 LEDs, starting with LED 0 ); // Now define the array of layers. Later layers take precedence @@ -104,7 +89,6 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( my_numlock_layer ); - bool led_update_user(led_t led_state) { rgblight_set_layer_state(1, led_state.caps_lock); rgblight_set_layer_state(2, led_state.num_lock); @@ -112,75 +96,21 @@ bool led_update_user(led_t led_state) { } void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; + // debug_enable=true; + // debug_matrix=true; // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); - // rgblight_mode_noeeprom(RGBLIGHT_EFFECT_KNIGHT); rgblight_set_effect_range(2, 12); - rgblight_enable(); - //rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); - } -#endif +#endif // endif RGBLIGHT_ENABLE -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RGB_MOD: - if (record->event.pressed) { - // Do something when pressed - } else { - // Do something else when release - print("begin rgb_mod\n"); - user_config.raw= eeconfig_read_user(); - uprintf("pre raw value: %lx\n", user_config.raw); - - user_config.rgb_layer_change = !user_config.rgb_layer_change; - eeconfig_update_user(user_config.raw); - - user_config.raw= eeconfig_read_user(); - uprintf("post raw value: %lx\n", user_config.raw); - print("done release rgb_mod\n"); - - #ifdef RGBLIGHT_ENABLE - print("begin change rgb mode\n"); - rgblight_step(); - print("done change rgb mode\n"); - #endif - - } - return false; // Skip all further processing of this key - default: - return true; // Process all other keycodes normally - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - user_config.raw = 2; - user_config.rgb_layer_change = true; // We want this enabled by default - eeconfig_update_user(user_config.raw); // Write default value to EEPROM now - - // use the non noeeprom versions, to write these values to EEPROM too -// rgblight_enable(); // Enable RGB by default -// rgblight_sethsv_cyan(); // Set it to CYAN by default -// rgblight_mode(1); // set to solid by default -} - -// void keyboard_post_init_user(void) { - -// debug_enable=true; -// debug_matrix=true; - -// } #ifdef OLED_ENABLE - -/* TODO: update bongo cat animation */ // Used to draw on to the oled screen bool oled_task_user(void) { draw_bongo(true); return false; } -#endif +#endif // endif OLED_ENABLE diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk deleted file mode 100644 index c922e471fa86..000000000000 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -ENCODER_MAP_ENABLE = yes -OLED_ENABLE = yes diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h index 442ef5666a76..346377a02e8c 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h @@ -1,3 +1,6 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms #define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 #define IDLE_FRAMES 5 @@ -497,18 +500,5 @@ static void draw_bongo(bool minimal) oled_set_cursor(0, 0); sprintf(wpm, "WPM:%03d", get_current_wpm()); oled_write(wpm, false); - - // // calculate && print clock - // oled_set_cursor(0, 2); - // uint8_t hour = last_minute / 60; - // uint16_t minute = last_minute % 60; - // bool is_pm = (hour / 12) > 0; - // hour = hour % 12; - // if (hour == 0) { - // hour = 12; - // } - // static char time_str[8] = ""; - // sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); - // oled_write(time_str, false); } } diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 7e490a91bca5..f2eddf32d573 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -1,18 +1,13 @@ -#include "keycodes.h" -#include QMK_KEYBOARD_H - +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "keycodes.h" #include "print.h" #include - -#define BONGO_ENABLE -#ifdef BONGO_ENABLE #include "bongo.h" -#endif -char wpm_str[10]; -/* TODO: add layers, add macro */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0 @@ -71,22 +66,21 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } }; -#endif +#endif // endif ENCODER_MAP_ENABLE #ifdef RGBLIGHT_ENABLE #define HSV_PASTEL_BLUE 150, 155, 51 -// Light LEDs 0 red when caps lock is active. Hard to ignore! + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 0 + {0, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 0 ); -// Light LEDs 1 red when num lock is active. Hard to ignore! const rgblight_segment_t PROGMEM my_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {1, 1, HSV_PASTEL_BLUE} // Light 1 LEDs, starting with LED 1 + {1, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 1 ); const rgblight_segment_t PROGMEM indicators_off_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 2, HSV_OFF} // Light 1 LEDs, starting with LED 1 + {0, 2, HSV_OFF} // Turn off 2 LEDs, starting with LED 0 ); // Now define the array of layers. Later layers take precedence @@ -103,21 +97,18 @@ bool led_update_user(led_t led_state) { } void keyboard_post_init_user(void) { - debug_enable=true; - debug_matrix=true; + // debug_enable=true; + // debug_matrix=true; // Enable the LED layers rgblight_layers = my_rgb_layers; rgblight_set_layer_state(0, 1); rgblight_set_effect_range(2, 12); - rgblight_enable(); } -#endif // end RGBLIGHT_ENABLE +#endif // endif RGBLIGHT_ENABLE #ifdef OLED_ENABLE - -/* TODO: update bongo cat animation */ // Used to draw on to the oled screen bool oled_task_user(void) { draw_bongo(true); diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk index c4731c6cab8c..6a4b39394623 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no -ENCODER_MAP_ENABLE = yes -OLED_ENABLE = yes + + diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index cd3c36958e06..b0e6501f6588 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -4,8 +4,8 @@ *A short description of the keyboard/project* -* Keyboard Maintainer: [Thanh Vinh](https://github.com/vinhcatba) -* Hardware Supported: *The PCBs, controllers supported* +* Keyboard Maintainer: [Vinh Le](https://github.com/vinhcatba) +* Hardware Supported: *The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill* * Hardware Availability: *Links to where you can find this hardware* Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index 6b7648feb02f..06c99231c997 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -7,4 +7,5 @@ EEPROM_DRIVER = i2c # using SSD1306 OLED driver OLED_ENABLE = yes OLED_DRIVER = SSD1306 -WPM_ENABLE = yes # WPM counter for oled \ No newline at end of file +WPM_ENABLE = yes # WPM counter for oled +ENCODER_MAP_ENABLE = yes From 615ee53de23e76ae44e8211534c127f6c3e33a4f Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 6 Jun 2023 19:50:07 +0700 Subject: [PATCH 31/46] update readme --- keyboards/vinhcatba/uncertainty/readme.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index b0e6501f6588..a577e6a7ff59 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -1,12 +1,12 @@ # uncertainty -![uncertainty](imgur.com image replace me!) +![uncertainty](https://i.imgur.com/IKrn37B.jpeg) *A short description of the keyboard/project* * Keyboard Maintainer: [Vinh Le](https://github.com/vinhcatba) -* Hardware Supported: *The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill* -* Hardware Availability: *Links to where you can find this hardware* +* Hardware Supported: The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill +* Hardware Availability: [Open-source hardware](https://github.com/vinhcatba/uncertainty) Make example for this keyboard (after setting up your build environment): @@ -20,8 +20,7 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Bootloader -Enter the bootloader in 3 ways: +Enter the bootloader in 2 ways: -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available +* **Physical reset button**: On Blackpill board: Hold `NRST` and `BOOT0` -> Release `NRST` first and **quickly** release `BOOT0` right after. +* **Keycode in layout**: Press `FN` + `ESC` From 573e11adbbe1e14516771412adc6400bbe3c24ce Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 6 Jun 2023 20:49:46 +0700 Subject: [PATCH 32/46] add license to header files, update ws2812 driver and DI_PIN to info.json --- keyboards/vinhcatba/uncertainty/halconf.h | 2 ++ keyboards/vinhcatba/uncertainty/info.json | 5 ++++- keyboards/vinhcatba/uncertainty/mcuconf.h | 2 ++ keyboards/vinhcatba/uncertainty/rules.mk | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/halconf.h b/keyboards/vinhcatba/uncertainty/halconf.h index 84921df44339..a2626140272e 100644 --- a/keyboards/vinhcatba/uncertainty/halconf.h +++ b/keyboards/vinhcatba/uncertainty/halconf.h @@ -1,3 +1,5 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 57e9542100d7..115703d0f652 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -34,7 +34,6 @@ }, "rgblight": { "led_count": 14, - "pin": "B1", "sleep": true, "max_brightness": 255, "brightness_steps": 10, @@ -55,6 +54,10 @@ "twinkle": true } }, + "ws2812": { + "driver": "pwm", + "pin": "B1" + }, "layouts": { "LAYOUT": { diff --git a/keyboards/vinhcatba/uncertainty/mcuconf.h b/keyboards/vinhcatba/uncertainty/mcuconf.h index 53d967f53473..e181cdb93bfd 100644 --- a/keyboards/vinhcatba/uncertainty/mcuconf.h +++ b/keyboards/vinhcatba/uncertainty/mcuconf.h @@ -1,3 +1,5 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include_next diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index 06c99231c997..c906d61ae925 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -1,5 +1,5 @@ -# using pwm driver on stm32f401 -WS2812_DRIVER = pwm +# using pwm driver on stm32f401 (moved to using info.json) +#WS2812_DRIVER = pwm # using external i2c eeprom EEPROM_DRIVER = i2c From 067aa5e0d69a94958dcf47db7ad9f46a4a279a44 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Wed, 7 Jun 2023 16:33:22 +0700 Subject: [PATCH 33/46] resovle PR suggestion for config.h, halconf.h, mcuconf.h --- keyboards/vinhcatba/uncertainty/config.h | 33 +++++------------------ keyboards/vinhcatba/uncertainty/halconf.h | 6 ++--- keyboards/vinhcatba/uncertainty/mcuconf.h | 6 ++--- 3 files changed, 10 insertions(+), 35 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index d28428080622..13d34bcdf605 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -3,35 +3,16 @@ #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - /* WS2812 driver config specifically for STM32F401 */ - // DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM +#define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM - #define WS2812_PWM_DRIVER PWMD3 // TIM3 - #define WS2812_PWM_CHANNEL 4 // CH4 - #define WS2812_PWM_PAL_MODE 2 // AF2 +#define WS2812_PWM_DRIVER PWMD3 // TIM3 +#define WS2812_PWM_CHANNEL 4 // CH4 +#define WS2812_PWM_PAL_MODE 2 // AF2 - #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) - #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) -#endif +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) +#define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) /* i2c peripheral config */ #define I2C_DRIVER I2CD1 @@ -51,7 +32,5 @@ //#define EEPROM_I2C_24LC32 /* OLED config */ -#ifdef OLED_ENABLE #define OLED_UPDATE_INTERVAL 100 #define OLED_BRIGHTNESS 200 -#endif diff --git a/keyboards/vinhcatba/uncertainty/halconf.h b/keyboards/vinhcatba/uncertainty/halconf.h index a2626140272e..0b105e29b8a3 100644 --- a/keyboards/vinhcatba/uncertainty/halconf.h +++ b/keyboards/vinhcatba/uncertainty/halconf.h @@ -2,10 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#ifdef RGBLIGHT_ENABLE - #undef HAL_USE_PWM - #define HAL_USE_PWM TRUE -#endif +#undef HAL_USE_PWM +#define HAL_USE_PWM TRUE #undef HAL_USE_I2C #define HAL_USE_I2C TRUE diff --git a/keyboards/vinhcatba/uncertainty/mcuconf.h b/keyboards/vinhcatba/uncertainty/mcuconf.h index e181cdb93bfd..313f8dd06a69 100644 --- a/keyboards/vinhcatba/uncertainty/mcuconf.h +++ b/keyboards/vinhcatba/uncertainty/mcuconf.h @@ -3,10 +3,8 @@ #pragma once #include_next -#ifdef RGBLIGHT_ENABLE - #undef STM32_PWM_USE_TIM3 - #define STM32_PWM_USE_TIM3 TRUE -#endif +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE From e2a21b56091c2f2520c6eafc4d69e50e8c9a09ea Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Wed, 7 Jun 2023 17:03:35 +0700 Subject: [PATCH 34/46] update info.json regarding PR comment --- keyboards/vinhcatba/uncertainty/info.json | 259 +++++++++++----------- 1 file changed, 128 insertions(+), 131 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 517924dfc6a6..0dbfe8bef220 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -2,45 +2,28 @@ "manufacturer": "Vinh Le", "keyboard_name": "Uncertainty", "maintainer": "vinhcatba", - "processor": "STM32F401", - "bootloader": "stm32-dfu", - "board": "BLACKPILL_STM32_F401", - + "development_board": "blackpill_f401", "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A13", "pin_b": "A14"} + ] + }, "features": { "bootmagic": true, "command": true, "console": true, + "encoder": true, "extrakey": true, "mousekey": true, "nkro": true, - "encoder": true, "rgblight": true }, "matrix_pins": { "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], "rows": ["B12", "B13", "B14", "B15", "A8", "A10"] }, - "url": "", - "usb": { - "device_version": "1.0.0", - "pid": "0x0000", - "vid": "0x564C" - }, - "encoder": { - "rotary": [ - { "pin_a": "A13", "pin_b": "A14", "resolution": 4 } - ] - }, "rgblight": { - "led_count": 14, - "sleep": true, - "max_brightness": 255, - "brightness_steps": 10, - "layers": { - "enabled": true, - "override_rgb": true - }, "animations": { "alternating": true, "breathing": true, @@ -52,7 +35,21 @@ "snake": true, "static_gradient": true, "twinkle": true - } + }, + "brightness_steps": 10, + "layers": { + "enabled": true, + "override_rgb": true + }, + "led_count": 14, + "max_brightness": 255, + "sleep": true + }, + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0x564C" }, "ws2812": { "driver": "pwm", @@ -60,112 +57,112 @@ }, "layouts": { "LAYOUT": { - "layout": [ - {"label": "0,0", "matrix": [0,0],"x": 1.25,"y": 0.25}, - {"label": "0,1", "matrix": [0,1],"x": 2.25,"y": 0.25}, - {"label": "0,2", "matrix": [0,2],"x": 3.25,"y": 0.25}, - {"label": "0,3", "matrix": [0,3],"x": 4.25,"y": 0.25}, - {"label": "0,4", "matrix": [0,4],"x": 5.25,"y": 0.25}, - {"label": "0,5", "matrix": [0,5],"x": 6.25,"y": 0.25}, - {"label": "0,6", "matrix": [0,6],"x": 7.25,"y": 0.25}, - {"label": "0,7", "matrix": [0,7],"x": 8.25,"y": 0.25}, - {"label": "0,8", "matrix": [0,8],"x": 9.25,"y": 0.25}, - {"label": "0,9", "matrix": [0,9],"x": 10.25,"y": 0.25}, - {"label": "0,10", "matrix": [0,10],"x": 11.25,"y": 0.25}, - {"label": "0,11", "matrix": [0,11],"x": 12.25,"y": 0.25}, - {"label": "0,12", "matrix": [0,12],"x": 13.25,"y": 0.25}, - {"label": "0,13", "matrix": [0,13],"x": 14.25,"y": 0.25}, - {"label": "0,14", "matrix": [0,14],"x": 15.25,"y": 0.25}, - {"label": "0,15", "matrix": [0,15],"x": 16.25,"y": 0.25}, - {"label": "0,16", "matrix": [0,16],"x": 17.25,"y": 0.25}, - {"label": "0,17", "matrix": [0,17],"x": 18.25,"y": 0.25}, - {"label": "1,17", "matrix": [1,17],"x": 19.25,"y": 0.25}, - {"label": "1,0", "matrix": [1,0],"x": 1.25,"y": 1.25}, - {"label": "1,1", "matrix": [1,1],"x": 2.25,"y": 1.25}, - {"label": "1,2", "matrix": [1,2],"x": 3.25,"y": 1.25}, - {"label": "1,3", "matrix": [1,3],"x": 4.25,"y": 1.25}, - {"label": "1,4", "matrix": [1,4],"x": 5.25,"y": 1.25}, - {"label": "1,5", "matrix": [1,5],"x": 6.25,"y": 1.25}, - {"label": "1,6", "matrix": [1,6],"x": 7.25,"y": 1.25}, - {"label": "1,7", "matrix": [1,7],"x": 8.25,"y": 1.25}, - {"label": "1,8", "matrix": [1,8],"x": 9.25,"y": 1.25}, - {"label": "1,9", "matrix": [1,9],"x": 10.25,"y": 1.25}, - {"label": "1,10", "matrix": [1,10],"x": 11.25,"y": 1.25}, - {"label": "1,11", "matrix": [1,11],"x": 12.25,"y": 1.25}, - {"label": "1,12", "matrix": [1,12],"x": 13.25,"y": 1.25}, - {"label": "1,13", "matrix": [1,13],"x": 14.25,"y": 1.25,"w": 2}, - {"label": "1,14", "matrix": [1,14],"x": 16.25,"y": 1.25}, - {"label": "1,15", "matrix": [1,15],"x": 17.25,"y": 1.25}, - {"label": "1,16", "matrix": [1,16],"x": 18.25,"y": 1.25}, - {"label": "3,17", "matrix": [3,17],"x": 19.25,"y": 1.25}, - {"label": "2,0", "matrix": [2,0],"x": 0,"y": 2}, - {"label": "2,1", "matrix": [2,1],"x": 1.25,"y": 2.25,"w": 1.5}, - {"label": "2,2", "matrix": [2,2],"x": 2.75,"y": 2.25}, - {"label": "2,3", "matrix": [2,3],"x": 3.75,"y": 2.25}, - {"label": "2,4", "matrix": [2,4],"x": 4.75,"y": 2.25}, - {"label": "2,5", "matrix": [2,5],"x": 5.75,"y": 2.25}, - {"label": "2,6", "matrix": [2,6],"x": 6.75,"y": 2.25}, - {"label": "2,7", "matrix": [2,7],"x": 7.75,"y": 2.25}, - {"label": "2,8", "matrix": [2,8],"x": 8.75,"y": 2.25}, - {"label": "2,9", "matrix": [2,9],"x": 9.75,"y": 2.25}, - {"label": "2,10", "matrix": [2,10],"x": 10.75,"y": 2.25}, - {"label": "2,11", "matrix": [2,11],"x": 11.75,"y": 2.25}, - {"label": "2,12", "matrix": [2,12],"x": 12.75,"y": 2.25}, - {"label": "2,13", "matrix": [2,13],"x": 13.75,"y": 2.25}, - {"label": "2,14", "matrix": [2,14],"x": 14.75,"y": 2.25,"w": 1.5}, - {"label": "2,15", "matrix": [2,15],"x": 16.25,"y": 2.25}, - {"label": "2,16", "matrix": [2,16],"x": 17.25,"y": 2.25}, - {"label": "2,17", "matrix": [2,17],"x": 18.25,"y": 2.25}, - {"label": "4,17", "matrix": [4,17],"x": 19.25,"y": 2.25,"h": 2}, - {"label": "3,0", "matrix": [3,0],"x": 0,"y": 3.25}, - {"label": "3,1", "matrix": [3,1],"x": 1.25,"y": 3.25,"w": 1.75}, - {"label": "3,2", "matrix": [3,2],"x": 3,"y": 3.25}, - {"label": "3,3", "matrix": [3,3],"x": 4,"y": 3.25}, - {"label": "3,4", "matrix": [3,4],"x": 5,"y": 3.25}, - {"label": "3,5", "matrix": [3,5],"x": 6,"y": 3.25}, - {"label": "3,6", "matrix": [3,6],"x": 7,"y": 3.25}, - {"label": "3,7", "matrix": [3,7],"x": 8,"y": 3.25}, - {"label": "3,8", "matrix": [3,8],"x": 9,"y": 3.25}, - {"label": "3,9", "matrix": [3,9],"x": 10,"y": 3.25}, - {"label": "3,10", "matrix": [3,10],"x": 11,"y": 3.25}, - {"label": "3,11", "matrix": [3,11],"x": 12,"y": 3.25}, - {"label": "3,12", "matrix": [3,12],"x": 13,"y": 3.25}, - {"label": "3,13", "matrix": [3,13],"x": 14,"y": 3.25,"w": 2.25}, - {"label": "3,14", "matrix": [3,14],"x": 16.25,"y": 3.25}, - {"label": "3,15", "matrix": [3,15],"x": 17.25,"y": 3.25}, - {"label": "3,16", "matrix": [3,16],"x": 18.25,"y": 3.25}, - {"label": "4,0", "matrix": [4,0],"x": 0,"y": 4.25}, - {"label": "4,1", "matrix": [4,1],"x": 1.25,"y": 4.25,"w": 2.25}, - {"label": "4,2", "matrix": [4,2],"x": 3.5,"y": 4.25}, - {"label": "4,3", "matrix": [4,3],"x": 4.5,"y": 4.25}, - {"label": "4,4", "matrix": [4,4],"x": 5.5,"y": 4.25}, - {"label": "4,5", "matrix": [4,5],"x": 6.5,"y": 4.25}, - {"label": "4,6", "matrix": [4,6],"x": 7.5,"y": 4.25}, - {"label": "4,7", "matrix": [4,7],"x": 8.5,"y": 4.25}, - {"label": "4,8", "matrix": [4,8],"x": 9.5,"y": 4.25}, - {"label": "4,9", "matrix": [4,9],"x": 10.5,"y": 4.25}, - {"label": "4,10", "matrix": [4,10],"x": 11.5,"y": 4.25}, - {"label": "4,11", "matrix": [4,11],"x": 12.5,"y": 4.25}, - {"label": "4,12", "matrix": [4,12],"x": 13.5,"y": 4.25,"w": 1.75}, - {"label": "4,13", "matrix": [4,13],"x": 15.25,"y": 4.25}, - {"label": "4,14", "matrix": [4,14],"x": 16.25,"y": 4.25}, - {"label": "4,15", "matrix": [4,15],"x": 17.25,"y": 4.25}, - {"label": "4,16", "matrix": [4,16],"x": 18.25,"y": 4.25}, - {"label": "5,17", "matrix": [5,17],"x": 19.25,"y": 4.25,"h": 2}, - {"label": "5,0", "matrix": [5,0],"x": 0,"y": 5.25}, - {"label": "5,1", "matrix": [5,1],"x": 1.25,"y": 5.25,"w": 1.25}, - {"label": "5,2", "matrix": [5,2],"x": 2.5,"y": 5.25,"w": 1.25}, - {"label": "5,3", "matrix": [5,3],"x": 3.75,"y": 5.25,"w": 1.25}, - {"label": "5,6", "matrix": [5,6],"x": 5,"y": 5.25,"w": 6.25}, - {"label": "5,7", "matrix": [5,7],"x": 11.25,"y": 5.25}, - {"label": "5,10", "matrix": [5,10],"x": 12.25,"y": 5.25}, - {"label": "5,11", "matrix": [5,11],"x": 13.25,"y": 5.25}, - {"label": "5,12", "matrix": [5,12],"x": 14.25,"y": 5.25}, - {"label": "5,13", "matrix": [5,13],"x": 15.25,"y": 5.25}, - {"label": "5,14", "matrix": [5,14],"x": 16.25,"y": 5.25}, - {"label": "5,15", "matrix": [5,15],"x": 17.25,"y": 5.25}, - {"label": "5,16", "matrix": [5,16],"x": 18.25,"y": 5.25} - ] + "layout": [ + {"label": "0,0", "matrix": [0, 0], "x": 1.25, "y": 0}, + {"label": "0,1", "matrix": [0, 1], "x": 2.25, "y": 0}, + {"label": "0,2", "matrix": [0, 2], "x": 3.25, "y": 0}, + {"label": "0,3", "matrix": [0, 3], "x": 4.25, "y": 0}, + {"label": "0,4", "matrix": [0, 4], "x": 5.25, "y": 0}, + {"label": "0,5", "matrix": [0, 5], "x": 6.25, "y": 0}, + {"label": "0,6", "matrix": [0, 6], "x": 7.25, "y": 0}, + {"label": "0,7", "matrix": [0, 7], "x": 8.25, "y": 0}, + {"label": "0,8", "matrix": [0, 8], "x": 9.25, "y": 0}, + {"label": "0,9", "matrix": [0, 9], "x": 10.25, "y": 0}, + {"label": "0,10", "matrix": [0, 10], "x": 11.25, "y": 0}, + {"label": "0,11", "matrix": [0, 11], "x": 12.25, "y": 0}, + {"label": "0,12", "matrix": [0, 12], "x": 13.25, "y": 0}, + {"label": "0,13", "matrix": [0, 13], "x": 14.25, "y": 0}, + {"label": "0,14", "matrix": [0, 14], "x": 15.25, "y": 0}, + {"label": "0,15", "matrix": [0, 15], "x": 16.25, "y": 0}, + {"label": "0,16", "matrix": [0, 16], "x": 17.25, "y": 0}, + {"label": "0,17", "matrix": [0, 17], "x": 18.25, "y": 0}, + {"label": "1,17", "matrix": [1, 17], "x": 19.25, "y": 0}, + {"label": "1,0", "matrix": [1, 0], "x": 1.25, "y": 1}, + {"label": "1,1", "matrix": [1, 1], "x": 2.25, "y": 1}, + {"label": "1,2", "matrix": [1, 2], "x": 3.25, "y": 1}, + {"label": "1,3", "matrix": [1, 3], "x": 4.25, "y": 1}, + {"label": "1,4", "matrix": [1, 4], "x": 5.25, "y": 1}, + {"label": "1,5", "matrix": [1, 5], "x": 6.25, "y": 1}, + {"label": "1,6", "matrix": [1, 6], "x": 7.25, "y": 1}, + {"label": "1,7", "matrix": [1, 7], "x": 8.25, "y": 1}, + {"label": "1,8", "matrix": [1, 8], "x": 9.25, "y": 1}, + {"label": "1,9", "matrix": [1, 9], "x": 10.25, "y": 1}, + {"label": "1,10", "matrix": [1, 10], "x": 11.25, "y": 1}, + {"label": "1,11", "matrix": [1, 11], "x": 12.25, "y": 1}, + {"label": "1,12", "matrix": [1, 12], "x": 13.25, "y": 1}, + {"label": "1,13", "matrix": [1, 13], "x": 14.25, "y": 1, "w": 2}, + {"label": "1,14", "matrix": [1, 14], "x": 16.25, "y": 1}, + {"label": "1,15", "matrix": [1, 15], "x": 17.25, "y": 1}, + {"label": "1,16", "matrix": [1, 16], "x": 18.25, "y": 1}, + {"label": "3,17", "matrix": [3, 17], "x": 19.25, "y": 1}, + {"label": "2,0", "matrix": [2, 0], "x": 0, "y": 1.75}, + {"label": "2,1", "matrix": [2, 1], "x": 1.25, "y": 2, "w": 1.5}, + {"label": "2,2", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "2,3", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "2,4", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "2,5", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "2,6", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "2,7", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "2,8", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "2,9", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "2,10", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "2,11", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "2,12", "matrix": [2, 12], "x": 12.75, "y": 2}, + {"label": "2,13", "matrix": [2, 13], "x": 13.75, "y": 2}, + {"label": "2,14", "matrix": [2, 14], "x": 14.75, "y": 2, "w": 1.5}, + {"label": "2,15", "matrix": [2, 15], "x": 16.25, "y": 2}, + {"label": "2,16", "matrix": [2, 16], "x": 17.25, "y": 2}, + {"label": "2,17", "matrix": [2, 17], "x": 18.25, "y": 2}, + {"label": "4,17", "matrix": [4, 17], "x": 19.25, "y": 2, "h": 2}, + {"label": "3,0", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "3,1", "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1.75}, + {"label": "3,2", "matrix": [3, 2], "x": 3, "y": 3}, + {"label": "3,3", "matrix": [3, 3], "x": 4, "y": 3}, + {"label": "3,4", "matrix": [3, 4], "x": 5, "y": 3}, + {"label": "3,5", "matrix": [3, 5], "x": 6, "y": 3}, + {"label": "3,6", "matrix": [3, 6], "x": 7, "y": 3}, + {"label": "3,7", "matrix": [3, 7], "x": 8, "y": 3}, + {"label": "3,8", "matrix": [3, 8], "x": 9, "y": 3}, + {"label": "3,9", "matrix": [3, 9], "x": 10, "y": 3}, + {"label": "3,10", "matrix": [3, 10], "x": 11, "y": 3}, + {"label": "3,11", "matrix": [3, 11], "x": 12, "y": 3}, + {"label": "3,12", "matrix": [3, 12], "x": 13, "y": 3}, + {"label": "3,13", "matrix": [3, 13], "x": 14, "y": 3, "w": 2.25}, + {"label": "3,14", "matrix": [3, 14], "x": 16.25, "y": 3}, + {"label": "3,15", "matrix": [3, 15], "x": 17.25, "y": 3}, + {"label": "3,16", "matrix": [3, 16], "x": 18.25, "y": 3}, + {"label": "4,0", "matrix": [4, 0], "x": 0, "y": 4}, + {"label": "4,1", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 2.25}, + {"label": "4,2", "matrix": [4, 2], "x": 3.5, "y": 4}, + {"label": "4,3", "matrix": [4, 3], "x": 4.5, "y": 4}, + {"label": "4,4", "matrix": [4, 4], "x": 5.5, "y": 4}, + {"label": "4,5", "matrix": [4, 5], "x": 6.5, "y": 4}, + {"label": "4,6", "matrix": [4, 6], "x": 7.5, "y": 4}, + {"label": "4,7", "matrix": [4, 7], "x": 8.5, "y": 4}, + {"label": "4,8", "matrix": [4, 8], "x": 9.5, "y": 4}, + {"label": "4,9", "matrix": [4, 9], "x": 10.5, "y": 4}, + {"label": "4,10", "matrix": [4, 10], "x": 11.5, "y": 4}, + {"label": "4,11", "matrix": [4, 11], "x": 12.5, "y": 4}, + {"label": "4,12", "matrix": [4, 12], "x": 13.5, "y": 4, "w": 1.75}, + {"label": "4,13", "matrix": [4, 13], "x": 15.25, "y": 4}, + {"label": "4,14", "matrix": [4, 14], "x": 16.25, "y": 4}, + {"label": "4,15", "matrix": [4, 15], "x": 17.25, "y": 4}, + {"label": "4,16", "matrix": [4, 16], "x": 18.25, "y": 4}, + {"label": "5,17", "matrix": [5, 17], "x": 19.25, "y": 4, "h": 2}, + {"label": "5,0", "matrix": [5, 0], "x": 0, "y": 5}, + {"label": "5,1", "matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"label": "5,2", "matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"label": "5,3", "matrix": [5, 3], "x": 3.75, "y": 5, "w": 1.25}, + {"label": "5,6", "matrix": [5, 6], "x": 5, "y": 5, "w": 6.25}, + {"label": "5,7", "matrix": [5, 7], "x": 11.25, "y": 5}, + {"label": "5,10", "matrix": [5, 10], "x": 12.25, "y": 5}, + {"label": "5,11", "matrix": [5, 11], "x": 13.25, "y": 5}, + {"label": "5,12", "matrix": [5, 12], "x": 14.25, "y": 5}, + {"label": "5,13", "matrix": [5, 13], "x": 15.25, "y": 5}, + {"label": "5,14", "matrix": [5, 14], "x": 16.25, "y": 5}, + {"label": "5,15", "matrix": [5, 15], "x": 17.25, "y": 5}, + {"label": "5,16", "matrix": [5, 16], "x": 18.25, "y": 5} + ] } } } From 41ee0e3a63fc3a65baced743c08eb18ff9f29cc4 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Wed, 7 Jun 2023 17:38:22 +0700 Subject: [PATCH 35/46] update bongo.h regarding PR comment --- .../uncertainty/{keymaps/default => }/bongo.h | 8 +- .../uncertainty/keymaps/default/keymap.c | 8 - .../vinhcatba/uncertainty/keymaps/via/bongo.h | 504 ------------------ .../uncertainty/keymaps/via/keymap.c | 10 +- keyboards/vinhcatba/uncertainty/uncertainty.c | 13 + 5 files changed, 18 insertions(+), 525 deletions(-) rename keyboards/vinhcatba/uncertainty/{keymaps/default => }/bongo.h (99%) delete mode 100644 keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h create mode 100644 keyboards/vinhcatba/uncertainty/uncertainty.c diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h b/keyboards/vinhcatba/uncertainty/bongo.h similarity index 99% rename from keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h rename to keyboards/vinhcatba/uncertainty/bongo.h index 346377a02e8c..c076d25e391a 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/bongo.h +++ b/keyboards/vinhcatba/uncertainty/bongo.h @@ -1,4 +1,4 @@ -// Copyright 2023 Vinh Le (@vinhcatba) +// Copyright 2022 Parker Levin (@pedker) // SPDX-License-Identifier: GPL-2.0-or-later #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms @@ -6,7 +6,7 @@ #define IDLE_FRAMES 5 #define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle #define TAP_FRAMES 2 -#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? +#define KEYS_SIZE 104 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? enum anim_states { @@ -498,7 +498,7 @@ static void draw_bongo(bool minimal) { // print wpm oled_set_cursor(0, 0); - sprintf(wpm, "WPM:%03d", get_current_wpm()); - oled_write(wpm, false); + oled_write("WPM:", false); + oled_write(get_u8_str(get_current_wpm(),'0'), false); } } diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 013343663992..8d4de43eda23 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -5,7 +5,6 @@ #include "keycodes.h" #include "print.h" #include -#include "bongo.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -107,10 +106,3 @@ void keyboard_post_init_user(void) { } #endif // endif RGBLIGHT_ENABLE -#ifdef OLED_ENABLE -// Used to draw on to the oled screen -bool oled_task_user(void) { - draw_bongo(true); - return false; -} -#endif // endif OLED_ENABLE diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h b/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h deleted file mode 100644 index 346377a02e8c..000000000000 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/bongo.h +++ /dev/null @@ -1,504 +0,0 @@ -// Copyright 2023 Vinh Le (@vinhcatba) -// SPDX-License-Identifier: GPL-2.0-or-later - -#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms -#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 -#define IDLE_FRAMES 5 -#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle -#define TAP_FRAMES 2 -#define KEYS_SIZE 100 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? - -enum anim_states -{ - Idle, - Prep, - Tap -}; -uint8_t anim_state = Idle; -uint32_t idle_timeout_timer = 0; -uint32_t anim_timer = 0; -uint8_t current_idle_frame = 0; -uint8_t current_tap_frame = 0; - -struct pair_int_int -{ - uint8_t first; - uint8_t second; -}; -struct pair_int_int pressed_keys[KEYS_SIZE]; -struct pair_int_int pressed_keys_prev[KEYS_SIZE]; -uint8_t pressed_keys_index = 0; - -bool key_down = 0; -char wpm[42]; - -static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, -}; - -static const char PROGMEM prep[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM prep_minimal[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, - 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, - 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -bool detect_key_down(void) -{ - // store the previous cycle's cache - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - pressed_keys_prev[i].first = pressed_keys[i].first; - pressed_keys_prev[i].second = pressed_keys[i].second; - } - - // fill cache with currently pressed keys - pressed_keys_index = 0; - for (uint8_t x = 0; x < MATRIX_ROWS; x++) - { - for (uint8_t y = 0; y < MATRIX_COLS; y++) - { - // is this key is currently down? - if (((matrix_get_row(x) & (1 << y)) > 0)) - { - pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check - pressed_keys[pressed_keys_index].second = y+1; - } - else - { - pressed_keys[pressed_keys_index].first = 0; - pressed_keys[pressed_keys_index].second = 0; - } - pressed_keys_index++; - } - } - - // check for a new key down compared to last cycle - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) - { - return true; - } - } - return false; -} - -void eval_anim_state(void) -{ - key_down = detect_key_down(); - - switch (anim_state) - { - case Idle: - if (key_down) // Idle to Tap - { - anim_state = Tap; - } - break; - - case Prep: - if (key_down) // Prep to Tap - { - anim_state = Tap; - } - else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle - { - anim_state = Idle; - current_idle_frame = 0; - } - break; - - case Tap: - if (!key_down) // Tap to Prep - { - anim_state = Prep; - idle_timeout_timer = timer_read32(); - } - break; - - default: - break; - } -} - -static void draw_bongo(bool minimal) -{ - eval_anim_state(); - - oled_set_cursor(0, 0); - - switch (anim_state) - { - case Idle: - if (minimal) - oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - else - oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) - { - current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; - anim_timer = timer_read32(); - } - break; - - case Prep: - if (minimal) - oled_write_raw_P(prep_minimal[0], ANIM_SIZE); - else - oled_write_raw_P(prep[0], ANIM_SIZE); - break; - - case Tap: - if (minimal) - oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - else - oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; - break; - - default: - break; - } - - if (!minimal) - { - // print wpm - oled_set_cursor(0, 0); - sprintf(wpm, "WPM:%03d", get_current_wpm()); - oled_write(wpm, false); - } -} diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index f2eddf32d573..265cc6ab11b6 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -5,7 +5,7 @@ #include "keycodes.h" #include "print.h" #include -#include "bongo.h" + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -107,11 +107,3 @@ void keyboard_post_init_user(void) { rgblight_enable(); } #endif // endif RGBLIGHT_ENABLE - -#ifdef OLED_ENABLE -// Used to draw on to the oled screen -bool oled_task_user(void) { - draw_bongo(true); - return false; -} -#endif diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.c b/keyboards/vinhcatba/uncertainty/uncertainty.c new file mode 100644 index 000000000000..5a74bb3dc1ad --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/uncertainty.c @@ -0,0 +1,13 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#ifdef OLED_ENABLE +#include "bongo.h" +// Used to draw on to the oled screen +bool oled_task_kb(void) { + draw_bongo(true); + return false; +} +#endif // endif OLED_ENABLE From 9ba31ee417b4a76416f5cbbad323823eaf670bb8 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Wed, 7 Jun 2023 18:12:08 +0700 Subject: [PATCH 36/46] add oled mode toggle --- .../uncertainty/keymaps/default/keymap.c | 42 +++++++++---------- .../uncertainty/keymaps/via/keymap.c | 42 ++++++++----------- keyboards/vinhcatba/uncertainty/uncertainty.c | 3 +- 3 files changed, 39 insertions(+), 48 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 8d4de43eda23..9bd6f1f75891 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -2,9 +2,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -#include "keycodes.h" -#include "print.h" -#include + +enum my_keycodes { + OLED_TOG = SAFE_RANGE +}; +extern bool oled_minimal; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -34,35 +36,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + OLED_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ - ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, - [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, - [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif // endif ENCODER_MAP_ENABLE @@ -106,3 +90,15 @@ void keyboard_post_init_user(void) { } #endif // endif RGBLIGHT_ENABLE +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case OLED_TOG: + if (record->event.pressed) { + oled_minimal = !oled_minimal; + } + return false; + default: + return true; + } +} + diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 265cc6ab11b6..4c7fa96ecff4 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -2,11 +2,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H -#include "keycodes.h" -#include "print.h" -#include - +enum my_keycodes { + OLED_TOG = SAFE_RANGE +}; +extern bool oled_minimal; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -36,35 +36,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , KC_SCRL, _______, _______, EE_CLR , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + OLED_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______,RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______ - ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______ ) }; #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, - [2] = { ENCODER_CCW_CW(KC_NO, KC_NO) }, - [3] = { ENCODER_CCW_CW(KC_NO, KC_NO) } + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif // endif ENCODER_MAP_ENABLE @@ -107,3 +89,15 @@ void keyboard_post_init_user(void) { rgblight_enable(); } #endif // endif RGBLIGHT_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case OLED_TOG: + if (record->event.pressed) { + oled_minimal = !oled_minimal; + } + return false; + default: + return true; + } +} diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.c b/keyboards/vinhcatba/uncertainty/uncertainty.c index 5a74bb3dc1ad..d586340b8f26 100644 --- a/keyboards/vinhcatba/uncertainty/uncertainty.c +++ b/keyboards/vinhcatba/uncertainty/uncertainty.c @@ -6,8 +6,9 @@ #ifdef OLED_ENABLE #include "bongo.h" // Used to draw on to the oled screen +bool oled_minimal = true; bool oled_task_kb(void) { - draw_bongo(true); + draw_bongo(oled_minimal); return false; } #endif // endif OLED_ENABLE From a63c32b9f72a574fe0694efe7aebcb07b61d3894 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Wed, 7 Jun 2023 18:21:08 +0700 Subject: [PATCH 37/46] update readme.md, rules.mk regarding PR comment --- keyboards/vinhcatba/uncertainty/readme.md | 14 +++++++------- keyboards/vinhcatba/uncertainty/rules.mk | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index a577e6a7ff59..19ce3c1cd3dc 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -2,25 +2,25 @@ ![uncertainty](https://i.imgur.com/IKrn37B.jpeg) -*A short description of the keyboard/project* +*This is an open source keyboard with exposed-component design. It has 96% (1800) layout with extra 3 keys on the left for custom macro (default are Copy, Paste and open Calculator). It features OLED screen, RGB Backlight, Encoder and VIA-supported. Powered by a STM32F401 Blackpill.* * Keyboard Maintainer: [Vinh Le](https://github.com/vinhcatba) -* Hardware Supported: The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill +* Hardware Supported: The PCB is [here](https://github.com/vinhcatba/uncertainty), controller supported: STM32F401 Blackpill, SSD1306 128x32 OLED, WS2812B RGB, External EEPROM, Rotary Encoder. * Hardware Availability: [Open-source hardware](https://github.com/vinhcatba/uncertainty) Make example for this keyboard (after setting up your build environment): - make uncertainty:default + make vinhcatba/uncertainty:default Flashing example for this keyboard: - make uncertainty:default:flash + make vinhcatba/uncertainty:default:flash 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). ## Bootloader -Enter the bootloader in 2 ways: - +Enter the bootloader in 3 ways: +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving. * **Physical reset button**: On Blackpill board: Hold `NRST` and `BOOT0` -> Release `NRST` first and **quickly** release `BOOT0` right after. -* **Keycode in layout**: Press `FN` + `ESC` +* **Keycode in layout**: `QK_BOOT` is on the second layer, replacing Escape (top left key). diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index c906d61ae925..33ce2ca64615 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -1,11 +1,8 @@ -# using pwm driver on stm32f401 (moved to using info.json) -#WS2812_DRIVER = pwm # using external i2c eeprom EEPROM_DRIVER = i2c # using SSD1306 OLED driver -OLED_ENABLE = yes OLED_DRIVER = SSD1306 WPM_ENABLE = yes # WPM counter for oled ENCODER_MAP_ENABLE = yes From 781cda15bcaba41572e18df2bceef72e9ee70daf Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Fri, 9 Jun 2023 20:30:13 +0700 Subject: [PATCH 38/46] add submodule update --- lib/chibios | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chibios b/lib/chibios index 0062927e3058..11edb1610980 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 0062927e3058a8b5ef587234bbd98d42fb4e595e +Subproject commit 11edb1610980f213b9f83161e1715a46fb7e4c51 From 918771b70807c65ad94512ac99a19a1d46bb53c5 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sat, 10 Jun 2023 17:31:24 +0700 Subject: [PATCH 39/46] move oled handle to keyboard level --- keyboards/vinhcatba/uncertainty/bongo.h | 2 ++ keyboards/vinhcatba/uncertainty/info.json | 3 ++- .../uncertainty/keymaps/default/keymap.c | 15 --------------- .../vinhcatba/uncertainty/keymaps/via/keymap.c | 15 --------------- keyboards/vinhcatba/uncertainty/uncertainty.c | 14 ++++++++++++++ keyboards/vinhcatba/uncertainty/uncertainty.h | 10 ++++++++++ 6 files changed, 28 insertions(+), 31 deletions(-) create mode 100644 keyboards/vinhcatba/uncertainty/uncertainty.h diff --git a/keyboards/vinhcatba/uncertainty/bongo.h b/keyboards/vinhcatba/uncertainty/bongo.h index c076d25e391a..c1ddd9d7c580 100644 --- a/keyboards/vinhcatba/uncertainty/bongo.h +++ b/keyboards/vinhcatba/uncertainty/bongo.h @@ -1,5 +1,7 @@ // Copyright 2022 Parker Levin (@pedker) // SPDX-License-Identifier: GPL-2.0-or-later +#pragma once +#include "quantum.h" #define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms #define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 0dbfe8bef220..08d678bab387 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -17,7 +17,8 @@ "extrakey": true, "mousekey": true, "nkro": true, - "rgblight": true + "rgblight": true, + "oled": true }, "matrix_pins": { "cols": ["A15", "B3", "B4", "B5", "B8", "B9", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14", "C13"], diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 9bd6f1f75891..690e241a51b8 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -3,10 +3,6 @@ #include QMK_KEYBOARD_H -enum my_keycodes { - OLED_TOG = SAFE_RANGE -}; -extern bool oled_minimal; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -90,15 +86,4 @@ void keyboard_post_init_user(void) { } #endif // endif RGBLIGHT_ENABLE -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case OLED_TOG: - if (record->event.pressed) { - oled_minimal = !oled_minimal; - } - return false; - default: - return true; - } -} diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 4c7fa96ecff4..79af4c8bdb3e 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -3,10 +3,6 @@ #include QMK_KEYBOARD_H -enum my_keycodes { - OLED_TOG = SAFE_RANGE -}; -extern bool oled_minimal; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -90,14 +86,3 @@ void keyboard_post_init_user(void) { } #endif // endif RGBLIGHT_ENABLE -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case OLED_TOG: - if (record->event.pressed) { - oled_minimal = !oled_minimal; - } - return false; - default: - return true; - } -} diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.c b/keyboards/vinhcatba/uncertainty/uncertainty.c index d586340b8f26..6753ed9a2c2d 100644 --- a/keyboards/vinhcatba/uncertainty/uncertainty.c +++ b/keyboards/vinhcatba/uncertainty/uncertainty.c @@ -1,6 +1,7 @@ // Copyright 2023 Vinh Le (@vinhcatba) // SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H #include "quantum.h" #ifdef OLED_ENABLE @@ -8,7 +9,20 @@ // Used to draw on to the oled screen bool oled_minimal = true; bool oled_task_kb(void) { + if(!oled_task_user()) { return false; } draw_bongo(oled_minimal); return false; } + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case OLED_TOG: + if (record->event.pressed) { + oled_minimal = !oled_minimal; + } + return false; + default: + return true; + } +} #endif // endif OLED_ENABLE diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.h b/keyboards/vinhcatba/uncertainty/uncertainty.h new file mode 100644 index 000000000000..91a3500b0889 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/uncertainty.h @@ -0,0 +1,10 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include "quantum.h" + +enum my_keycodes { + OLED_TOG = QK_KB +}; + From d228679add752ab7d54c3ff1ccaacb39749d6e90 Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Sat, 10 Jun 2023 17:42:05 +0700 Subject: [PATCH 40/46] Update keyboards/vinhcatba/uncertainty/uncertainty.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit forgot user-level proces_record Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> --- keyboards/vinhcatba/uncertainty/uncertainty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.c b/keyboards/vinhcatba/uncertainty/uncertainty.c index 6753ed9a2c2d..19e5a5cfd537 100644 --- a/keyboards/vinhcatba/uncertainty/uncertainty.c +++ b/keyboards/vinhcatba/uncertainty/uncertainty.c @@ -15,6 +15,10 @@ bool oled_task_kb(void) { } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { case OLED_TOG: if (record->event.pressed) { From 023622711507a52f2eb6878dbf9ec1267e307494 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Sun, 11 Jun 2023 23:18:06 +0700 Subject: [PATCH 41/46] now using bongo as source file --- keyboards/vinhcatba/uncertainty/bongo.c | 506 +++++++++++++++++++++++ keyboards/vinhcatba/uncertainty/bongo.h | 504 +--------------------- keyboards/vinhcatba/uncertainty/rules.mk | 2 +- 3 files changed, 509 insertions(+), 503 deletions(-) create mode 100644 keyboards/vinhcatba/uncertainty/bongo.c diff --git a/keyboards/vinhcatba/uncertainty/bongo.c b/keyboards/vinhcatba/uncertainty/bongo.c new file mode 100644 index 000000000000..707955ee8810 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/bongo.c @@ -0,0 +1,506 @@ +// Copyright 2022 Parker Levin (@pedker) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define IDLE_FRAMES 5 +#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle +#define TAP_FRAMES 2 +#define KEYS_SIZE 104 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? + +enum anim_states +{ + Idle, + Prep, + Tap +}; +uint8_t anim_state = Idle; +uint32_t idle_timeout_timer = 0; +uint32_t anim_timer = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +struct pair_int_int +{ + uint8_t first; + uint8_t second; +}; +struct pair_int_int pressed_keys[KEYS_SIZE]; +struct pair_int_int pressed_keys_prev[KEYS_SIZE]; +uint8_t pressed_keys_index = 0; + +bool key_down = 0; +char wpm[42]; + +static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, + 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, +}; + +static const char PROGMEM prep[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM prep_minimal[][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = +{ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, + 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, + 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, + 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, + 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, + 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, + 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, + 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, + 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, + 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } +}; + +bool detect_key_down(void) +{ + // store the previous cycle's cache + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + pressed_keys_prev[i].first = pressed_keys[i].first; + pressed_keys_prev[i].second = pressed_keys[i].second; + } + + // fill cache with currently pressed keys + pressed_keys_index = 0; + for (uint8_t x = 0; x < MATRIX_ROWS; x++) + { + for (uint8_t y = 0; y < MATRIX_COLS; y++) + { + // is this key is currently down? + if (((matrix_get_row(x) & (1 << y)) > 0)) + { + pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check + pressed_keys[pressed_keys_index].second = y+1; + } + else + { + pressed_keys[pressed_keys_index].first = 0; + pressed_keys[pressed_keys_index].second = 0; + } + pressed_keys_index++; + } + } + + // check for a new key down compared to last cycle + for (uint8_t i = 0; i < KEYS_SIZE; ++i) + { + if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) + { + return true; + } + } + return false; +} + +void eval_anim_state(void) +{ + key_down = detect_key_down(); + + switch (anim_state) + { + case Idle: + if (key_down) // Idle to Tap + { + anim_state = Tap; + } + break; + + case Prep: + if (key_down) // Prep to Tap + { + anim_state = Tap; + } + else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle + { + anim_state = Idle; + current_idle_frame = 0; + } + break; + + case Tap: + if (!key_down) // Tap to Prep + { + anim_state = Prep; + idle_timeout_timer = timer_read32(); + } + break; + + default: + break; + } +} + +void draw_bongo(bool minimal) +{ + eval_anim_state(); + + oled_set_cursor(0, 0); + + switch (anim_state) + { + case Idle: + if (minimal) + oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + else + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) + { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + anim_timer = timer_read32(); + } + break; + + case Prep: + if (minimal) + oled_write_raw_P(prep_minimal[0], ANIM_SIZE); + else + oled_write_raw_P(prep[0], ANIM_SIZE); + break; + + case Tap: + if (minimal) + oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + else + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + break; + + default: + break; + } + + if (!minimal) + { + // print wpm + oled_set_cursor(0, 0); + oled_write("WPM:", false); + oled_write(get_u8_str(get_current_wpm(),'0'), false); + } +} diff --git a/keyboards/vinhcatba/uncertainty/bongo.h b/keyboards/vinhcatba/uncertainty/bongo.h index c1ddd9d7c580..d1cecbc61972 100644 --- a/keyboards/vinhcatba/uncertainty/bongo.h +++ b/keyboards/vinhcatba/uncertainty/bongo.h @@ -1,506 +1,6 @@ // Copyright 2022 Parker Levin (@pedker) // SPDX-License-Identifier: GPL-2.0-or-later -#pragma once -#include "quantum.h" - -#define ANIM_FRAME_DURATION 75 // how long each frame lasts in ms -#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 -#define IDLE_FRAMES 5 -#define IDLE_TIMEOUT 750 // the amount of time it takes to return to idle -#define TAP_FRAMES 2 -#define KEYS_SIZE 104 // the number of keys stored in the array that tracks keypresses; how many keys are on the board? - -enum anim_states -{ - Idle, - Prep, - Tap -}; -uint8_t anim_state = Idle; -uint32_t idle_timeout_timer = 0; -uint32_t anim_timer = 0; -uint8_t current_idle_frame = 0; -uint8_t current_tap_frame = 0; - -struct pair_int_int -{ - uint8_t first; - uint8_t second; -}; -struct pair_int_int pressed_keys[KEYS_SIZE]; -struct pair_int_int pressed_keys_prev[KEYS_SIZE]; -uint8_t pressed_keys_index = 0; - -bool key_down = 0; -char wpm[42]; - -static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM idle_minimal[IDLE_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, - 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, -}; - -static const char PROGMEM prep[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM prep_minimal[][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -static const char PROGMEM tap_minimal[TAP_FRAMES][ANIM_SIZE] = -{ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, - 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, - 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, - 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, - 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, - 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, - 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, - 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, - 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, - 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, - 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -bool detect_key_down(void) -{ - // store the previous cycle's cache - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - pressed_keys_prev[i].first = pressed_keys[i].first; - pressed_keys_prev[i].second = pressed_keys[i].second; - } - - // fill cache with currently pressed keys - pressed_keys_index = 0; - for (uint8_t x = 0; x < MATRIX_ROWS; x++) - { - for (uint8_t y = 0; y < MATRIX_COLS; y++) - { - // is this key is currently down? - if (((matrix_get_row(x) & (1 << y)) > 0)) - { - pressed_keys[pressed_keys_index].first = x+1; // adding 1 to the row/col so that we can use 0 as a null-check - pressed_keys[pressed_keys_index].second = y+1; - } - else - { - pressed_keys[pressed_keys_index].first = 0; - pressed_keys[pressed_keys_index].second = 0; - } - pressed_keys_index++; - } - } - // check for a new key down compared to last cycle - for (uint8_t i = 0; i < KEYS_SIZE; ++i) - { - if (pressed_keys[i].first && pressed_keys[i].second && !pressed_keys_prev[i].first && !pressed_keys_prev[i].second) - { - return true; - } - } - return false; -} - -void eval_anim_state(void) -{ - key_down = detect_key_down(); - - switch (anim_state) - { - case Idle: - if (key_down) // Idle to Tap - { - anim_state = Tap; - } - break; - - case Prep: - if (key_down) // Prep to Tap - { - anim_state = Tap; - } - else if (timer_elapsed32(idle_timeout_timer) >= IDLE_TIMEOUT) // Prep to Idle - { - anim_state = Idle; - current_idle_frame = 0; - } - break; - - case Tap: - if (!key_down) // Tap to Prep - { - anim_state = Prep; - idle_timeout_timer = timer_read32(); - } - break; - - default: - break; - } -} - -static void draw_bongo(bool minimal) -{ - eval_anim_state(); - - oled_set_cursor(0, 0); - - switch (anim_state) - { - case Idle: - if (minimal) - oled_write_raw_P(idle_minimal[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - else - oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); - if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) - { - current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; - anim_timer = timer_read32(); - } - break; - - case Prep: - if (minimal) - oled_write_raw_P(prep_minimal[0], ANIM_SIZE); - else - oled_write_raw_P(prep[0], ANIM_SIZE); - break; - - case Tap: - if (minimal) - oled_write_raw_P(tap_minimal[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - else - oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); - current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; - break; - - default: - break; - } +#pragma once - if (!minimal) - { - // print wpm - oled_set_cursor(0, 0); - oled_write("WPM:", false); - oled_write(get_u8_str(get_current_wpm(),'0'), false); - } -} +void draw_bongo(bool minimal); diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index 33ce2ca64615..fa776de5b56f 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -1,4 +1,4 @@ - +SRC += bongo.c # using external i2c eeprom EEPROM_DRIVER = i2c From e097c7952c3b5ca632115470eac9a3fe0d62a907 Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Tue, 4 Jul 2023 22:22:57 +0700 Subject: [PATCH 42/46] Apply suggestions from code review remove default value codes Co-authored-by: Drashna Jaelre --- keyboards/vinhcatba/uncertainty/config.h | 8 +------- keyboards/vinhcatba/uncertainty/rules.mk | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index 13d34bcdf605..e05507ce4755 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -14,15 +14,9 @@ #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual) #define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual) -/* i2c peripheral config */ -#define I2C_DRIVER I2CD1 -#define I2C1_SCL_PIN B6 -#define I2C1_SDA_PIN B7 -#define I2C_SCL_PAL_MODE 4 -#define I2C_SDA_PAL_MODE 4 #define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 /* eeprom i2c driver config */ #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index fa776de5b56f..280082cb32ba 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -2,7 +2,5 @@ SRC += bongo.c # using external i2c eeprom EEPROM_DRIVER = i2c -# using SSD1306 OLED driver -OLED_DRIVER = SSD1306 WPM_ENABLE = yes # WPM counter for oled ENCODER_MAP_ENABLE = yes From 5f9fa7f29cec4c9d17a12156974167d5d67f6942 Mon Sep 17 00:00:00 2001 From: Vinh Le Date: Tue, 4 Jul 2023 22:34:12 +0700 Subject: [PATCH 43/46] move WPM_ENABLE and ENCODER_MAP_ENABLE to keymap level --- keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk | 2 ++ keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk | 2 ++ keyboards/vinhcatba/uncertainty/rules.mk | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk new file mode 100644 index 000000000000..6f7b31378d2d --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +WPM_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk index 6a4b39394623..2dc93640f977 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -2,4 +2,6 @@ VIA_ENABLE = yes MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no +WPM_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/vinhcatba/uncertainty/rules.mk b/keyboards/vinhcatba/uncertainty/rules.mk index 280082cb32ba..6255f6529472 100644 --- a/keyboards/vinhcatba/uncertainty/rules.mk +++ b/keyboards/vinhcatba/uncertainty/rules.mk @@ -1,6 +1,3 @@ SRC += bongo.c # using external i2c eeprom EEPROM_DRIVER = i2c - -WPM_ENABLE = yes # WPM counter for oled -ENCODER_MAP_ENABLE = yes From 26e05ebfd5a4a83d6d3fdf796930d90270d20f3a Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Wed, 5 Jul 2023 18:59:09 +0700 Subject: [PATCH 44/46] Apply suggestions from code review Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/vinhcatba/uncertainty/info.json | 5 +++-- keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c | 2 +- keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk | 1 - keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c | 2 +- keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk | 5 ----- keyboards/vinhcatba/uncertainty/readme.md | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/info.json b/keyboards/vinhcatba/uncertainty/info.json index 08d678bab387..fc0e69ad19fb 100644 --- a/keyboards/vinhcatba/uncertainty/info.json +++ b/keyboards/vinhcatba/uncertainty/info.json @@ -11,8 +11,9 @@ }, "features": { "bootmagic": true, - "command": true, - "console": true, + "command": false, + "console": false, + "wpm": true, "encoder": true, "extrakey": true, "mousekey": true, diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index 690e241a51b8..a5869c57bf72 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk index 6f7b31378d2d..ee325681483f 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/rules.mk @@ -1,2 +1 @@ -WPM_ENABLE = yes ENCODER_MAP_ENABLE = yes diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c index 79af4c8bdb3e..2427393be72d 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; diff --git a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk index 2dc93640f977..f1adcab005e8 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk +++ b/keyboards/vinhcatba/uncertainty/keymaps/via/rules.mk @@ -1,7 +1,2 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -CONSOLE_ENABLE = no - -WPM_ENABLE = yes ENCODER_MAP_ENABLE = yes - diff --git a/keyboards/vinhcatba/uncertainty/readme.md b/keyboards/vinhcatba/uncertainty/readme.md index 19ce3c1cd3dc..ead5d17c5403 100644 --- a/keyboards/vinhcatba/uncertainty/readme.md +++ b/keyboards/vinhcatba/uncertainty/readme.md @@ -1,6 +1,6 @@ # uncertainty -![uncertainty](https://i.imgur.com/IKrn37B.jpeg) +![uncertainty](https://i.imgur.com/IKrn37Bh.jpeg) *This is an open source keyboard with exposed-component design. It has 96% (1800) layout with extra 3 keys on the left for custom macro (default are Copy, Paste and open Calculator). It features OLED screen, RGB Backlight, Encoder and VIA-supported. Powered by a STM32F401 Blackpill.* From dac0c3b8e6974460653cbaf6577098ca8707eb9f Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Mon, 28 Aug 2023 09:30:39 +0700 Subject: [PATCH 45/46] Apply suggestions from code review Co-authored-by: Duncan Sutherland --- keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c index a5869c57bf72..910453e76d9d 100644 --- a/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c +++ b/keyboards/vinhcatba/uncertainty/keymaps/default/keymap.c @@ -41,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) } }; #endif // endif ENCODER_MAP_ENABLE #ifdef RGBLIGHT_ENABLE -#define HSV_PASTEL_BLUE 150, 155, 51 +# define HSV_PASTEL_BLUE 150, 155, 51 const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_PASTEL_BLUE} // Light 1 LED, starting with LED 0 From ac6d42f12228d31b1c8bd79da36897dc80702b73 Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Wed, 30 Aug 2023 13:15:48 +0700 Subject: [PATCH 46/46] Update keyboards/vinhcatba/uncertainty/config.h Co-authored-by: Drashna Jaelre --- keyboards/vinhcatba/uncertainty/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/vinhcatba/uncertainty/config.h b/keyboards/vinhcatba/uncertainty/config.h index e05507ce4755..288f1d81a947 100644 --- a/keyboards/vinhcatba/uncertainty/config.h +++ b/keyboards/vinhcatba/uncertainty/config.h @@ -5,7 +5,7 @@ /* WS2812 driver config specifically for STM32F401 */ // DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet) -#define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM +#define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM #define WS2812_PWM_DRIVER PWMD3 // TIM3 #define WS2812_PWM_CHANNEL 4 // CH4