From 6ddc361854433f5abdb985a26e3bb87e8c5e418a Mon Sep 17 00:00:00 2001 From: hsginjake Date: Tue, 15 Jan 2019 21:07:03 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E3=82=B5=E3=83=B3=E3=82=B7=E3=83=A3?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=B4=E3=81=A3=E3=81=8B=E3=81=B4=E3=81=8B?= =?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/switch42/keymaps/ginjake/config.h | 40 ++++ keyboards/switch42/keymaps/ginjake/keymap.c | 247 ++++++++++++++++++++ keyboards/switch42/keymaps/ginjake/rules.mk | 21 ++ 3 files changed, 308 insertions(+) create mode 100644 keyboards/switch42/keymaps/ginjake/config.h create mode 100644 keyboards/switch42/keymaps/ginjake/keymap.c create mode 100644 keyboards/switch42/keymaps/ginjake/rules.mk diff --git a/keyboards/switch42/keymaps/ginjake/config.h b/keyboards/switch42/keymaps/ginjake/config.h new file mode 100644 index 000000000000..47cd74172890 --- /dev/null +++ b/keyboards/switch42/keymaps/ginjake/config.h @@ -0,0 +1,40 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/switch42/keymaps/ginjake/keymap.c b/keyboards/switch42/keymaps/ginjake/keymap.c new file mode 100644 index 000000000000..0fcce8a20189 --- /dev/null +++ b/keyboards/switch42/keymaps/ginjake/keymap.c @@ -0,0 +1,247 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST, + AQOURS //サンシャインぴっかぴかモード +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LSMOD RGB_SMOD +#define KC_CTLTB CTL_T(KC_TAB) +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) +#define KC_AQOURS AQOURS + +#ifdef RGBLIGHT_ENABLE +//9色に変化するLEDのHSV各パラメータ +//千歌,梨子,果南,ダイヤ,曜,善子,花丸,マリ、ルビィ +int aqours_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322}; +int aqours_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255}; +int aqours_v[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; +const int NEXT_COLOR_TIME = 2400; //次の色に切り替わるまでの時間 +const int NEXT_CHANGE_TARGET_TIME = 150; //次のキーに色が伝播するまでの時間 +bool aqours_mode = false; +int aqours_next_color_timer_count = 0; +int aqours_num = 0; +int target_col = 0; + +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + AQOURS, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ + //`------+------+------+------+------+------| |------+------+------+------+------+------' + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, XXXXX,\ + //`------+------+------+------+------+------| |------+------+------+------+------+------' + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + //`------+------+------+------+------+------| |------+------+------+------+------+------' + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //`------+------+------+------+------+------| |------+------+------+------+------+------' + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +#ifdef RGBLIGHT_ENABLE + + void aqours_led(void) { + aqours_next_color_timer_count++; + //一定間隔で色が変化 + if (aqours_next_color_timer_count > NEXT_COLOR_TIME) { + aqours_num++; + aqours_next_color_timer_count = 0; + target_col = 0; + if (aqours_num == sizeof(aqours_h) / sizeof(int)) { + aqours_num = 0; + } + } + + //キー毎に時間差で色が変化していく + if (aqours_next_color_timer_count % NEXT_CHANGE_TARGET_TIME == 0) { + if (target_col < MATRIX_COLS) { + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[11 - target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[12 + target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[23 - target_col]); + target_col++; + rgblight_set(); + } + } + } +#endif + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + if (aqours_mode) { + aqours_led(); + } + #endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case AQOURS: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + aqours_mode = !aqours_mode; + } + #endif + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + aqours_mode = false; + } + #endif + break; + } + return true; +} diff --git a/keyboards/switch42/keymaps/ginjake/rules.mk b/keyboards/switch42/keymaps/ginjake/rules.mk new file mode 100644 index 000000000000..1c3e92b69f20 --- /dev/null +++ b/keyboards/switch42/keymaps/ginjake/rules.mk @@ -0,0 +1,21 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From e080e3aac39d261bae53e410f72e9a8099f722df Mon Sep 17 00:00:00 2001 From: hsginjake Date: Fri, 18 Jan 2019 01:49:59 +0900 Subject: [PATCH 2/3] LOVELIVE --- keyboards/switch42/keymaps/ginjake/keymap.c | 59 +++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/keyboards/switch42/keymaps/ginjake/keymap.c b/keyboards/switch42/keymaps/ginjake/keymap.c index 0fcce8a20189..8813b59f935b 100644 --- a/keyboards/switch42/keymaps/ginjake/keymap.c +++ b/keyboards/switch42/keymaps/ginjake/keymap.c @@ -30,7 +30,8 @@ enum custom_keycodes { ADJUST, BACKLIT, RGBRST, - AQOURS //サンシャインぴっかぴかモード + AQOURS, //サンシャインぴっかぴかモード + ELEC_BOARD //電光掲示板 }; enum macro_keycodes { @@ -55,7 +56,7 @@ enum macro_keycodes { #define KC_GUIEI GUI_T(KC_LANG2) #define KC_ALTKN ALT_T(KC_LANG1) #define KC_AQOURS AQOURS - +#define KC_ELEC_BOARD ELEC_BOARD #ifdef RGBLIGHT_ENABLE //9色に変化するLEDのHSV各パラメータ //千歌,梨子,果南,ダイヤ,曜,善子,花丸,マリ、ルビィ @@ -69,12 +70,25 @@ int aqours_next_color_timer_count = 0; int aqours_num = 0; int target_col = 0; + +//■ ■■■ ■ ■ ■■■ ■ ■ ■ ■ ■■■ +//■ ■ ■ ■ ■ ■■ ■ ■ ■ ■ ■■ +//■■■ ■■■ ■ ■■■ ■■■ ■ ■ ■■■ +#define ELECTRIC_BOARD_LENGTH 43 +bool electric_board_mode = false; +int electric_board_data[3][ELECTRIC_BOARD_LENGTH] = { + {1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1}, + {1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0}, + {1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1} +}; + #endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - AQOURS, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + AQOURS, ELEC_BOARD, W, E, R, T, Y, U, I, O, P, BSPC,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| @@ -163,6 +177,33 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } } + + int board_timer = 0; + int board_index = 0; + void electric_board_render(void) { + board_timer++; + if (board_timer == 400) { + board_timer = 0; + board_index++; + if (board_index == ELECTRIC_BOARD_LENGTH) { + board_index = 0; + } + for (int i = 0; i <= 6; i++) { + for (int c = 0; c <= 2; c++) { + int read_num = board_index + i; + if (read_num > ELECTRIC_BOARD_LENGTH) { + read_num = read_num - ELECTRIC_BOARD_LENGTH; + } + if (electric_board_data[c][read_num]) { + sethsv(aqours_h[0], aqours_s[0], aqours_v[0], (LED_TYPE *)&led[i + 6 * c]); + } else { + sethsv(0, 0, 0, (LED_TYPE *)&led[i + 6 * c]); + } + } + } + rgblight_set(); + } + }; #endif void matrix_init_user(void) { @@ -176,6 +217,9 @@ void matrix_scan_user(void) { if (aqours_mode) { aqours_led(); } + if (electric_board_mode) { + electric_board_render(); + } #endif } @@ -239,9 +283,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgblight_enable(); RGB_current_mode = rgblight_config.mode; aqours_mode = false; + electric_board_mode = false; } #endif break; + case ELEC_BOARD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + electric_board_mode = !electric_board_mode; + aqours_mode = false; + } + #endif + break; } return true; } From e0e104f0f07fa35de929f9f6fcd9902fa8f4b216 Mon Sep 17 00:00:00 2001 From: hsginjake Date: Sun, 20 Jan 2019 01:21:53 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E9=9B=BB=E5=85=89=E6=8E=B2=E7=A4=BA?= =?UTF-8?q?=E6=9D=BF=E3=80=81=E5=B7=A6=E5=8F=B3=E5=90=8C=E6=9C=9F=E3=83=A2?= =?UTF-8?q?=E3=83=89=E3=82=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/switch42/keymaps/ginjake/keymap.c | 27 +++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/keyboards/switch42/keymaps/ginjake/keymap.c b/keyboards/switch42/keymaps/ginjake/keymap.c index 8813b59f935b..35d7d44e69b1 100644 --- a/keyboards/switch42/keymaps/ginjake/keymap.c +++ b/keyboards/switch42/keymaps/ginjake/keymap.c @@ -69,17 +69,17 @@ bool aqours_mode = false; int aqours_next_color_timer_count = 0; int aqours_num = 0; int target_col = 0; - +static uint16_t color_timer, change_target_timer; //■ ■■■ ■ ■ ■■■ ■ ■ ■ ■ ■■■ //■ ■ ■ ■ ■ ■■ ■ ■ ■ ■ ■■ //■■■ ■■■ ■ ■■■ ■■■ ■ ■ ■■■ -#define ELECTRIC_BOARD_LENGTH 43 +#define ELECTRIC_BOARD_LENGTH 47 bool electric_board_mode = false; int electric_board_data[3][ELECTRIC_BOARD_LENGTH] = { - {1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1}, - {1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0}, - {1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1} + {1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,}, + {1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,}, + {1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,} }; #endif @@ -181,23 +181,26 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { int board_timer = 0; int board_index = 0; void electric_board_render(void) { - board_timer++; - if (board_timer == 400) { + if (timer_elapsed(color_timer) > 400) { + color_timer = timer_read(); board_timer = 0; board_index++; if (board_index == ELECTRIC_BOARD_LENGTH) { board_index = 0; } - for (int i = 0; i <= 6; i++) { + for (int i = 0; i <= 5; i++) { for (int c = 0; c <= 2; c++) { int read_num = board_index + i; + if (!is_master) { + read_num = read_num + 6; + } if (read_num > ELECTRIC_BOARD_LENGTH) { read_num = read_num - ELECTRIC_BOARD_LENGTH; } if (electric_board_data[c][read_num]) { - sethsv(aqours_h[0], aqours_s[0], aqours_v[0], (LED_TYPE *)&led[i + 6 * c]); + sethsv(aqours_h[3], aqours_s[3], aqours_v[3], (LED_TYPE *)&led[i + 6 * c]); } else { - sethsv(0, 0, 0, (LED_TYPE *)&led[i + 6 * c]); + sethsv(aqours_h[4], aqours_s[4], aqours_v[4], (LED_TYPE *)&led[i + 6 * c]); } } } @@ -293,6 +296,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { electric_board_mode = !electric_board_mode; aqours_mode = false; } + if (electric_board_mode) { + color_timer = timer_read(); + change_target_timer = color_timer; + } #endif break; }