From 93de5335803242f1df93600602ef5725d4df3a4c Mon Sep 17 00:00:00 2001 From: muge <221161+muge@users.noreply.github.com> Date: Thu, 26 Dec 2024 08:58:26 +0000 Subject: [PATCH] Move cxt_studio keyboard to own folder (#24748) --- data/mappings/keyboard_aliases.hjson | 3 +++ keyboards/cxt_studio/12e4/config.h | 6 +++++ keyboards/cxt_studio/{ => 12e4}/cxt_studio.c | 20 +++++------------ keyboards/cxt_studio/{ => 12e4}/keyboard.json | 2 +- .../{ => 12e4}/keymaps/default/keymap.json | 2 +- keyboards/cxt_studio/{ => 12e4}/readme.md | 10 ++++----- keyboards/cxt_studio/config.h | 22 ------------------- 7 files changed, 22 insertions(+), 43 deletions(-) create mode 100644 keyboards/cxt_studio/12e4/config.h rename keyboards/cxt_studio/{ => 12e4}/cxt_studio.c (68%) rename keyboards/cxt_studio/{ => 12e4}/keyboard.json (98%) rename keyboards/cxt_studio/{ => 12e4}/keymaps/default/keymap.json (90%) rename keyboards/cxt_studio/{ => 12e4}/readme.md (83%) delete mode 100644 keyboards/cxt_studio/config.h diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 098c299e586e..4fd959c4eb2e 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -140,6 +140,9 @@ "custommk/genesis": { "target": "custommk/genesis/rev1" }, + "cxt_studio":{ + "target":"cxt_studio/12e4" + }, "daisy": { "target": "ktec/daisy" }, diff --git a/keyboards/cxt_studio/12e4/config.h b/keyboards/cxt_studio/12e4/config.h new file mode 100644 index 000000000000..de0fbad7ec47 --- /dev/null +++ b/keyboards/cxt_studio/12e4/config.h @@ -0,0 +1,6 @@ +// Copyright 2023 Colin Kinloch (@ColinKinloch) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 9 diff --git a/keyboards/cxt_studio/cxt_studio.c b/keyboards/cxt_studio/12e4/cxt_studio.c similarity index 68% rename from keyboards/cxt_studio/cxt_studio.c rename to keyboards/cxt_studio/12e4/cxt_studio.c index 2b36905340b5..03a15e4d48df 100644 --- a/keyboards/cxt_studio/cxt_studio.c +++ b/keyboards/cxt_studio/12e4/cxt_studio.c @@ -3,8 +3,6 @@ #include "quantum.h" -static uint8_t anim = 0; - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { @@ -21,32 +19,26 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { break; case 1: { if (clockwise) { - rgblight_increase_hue(); + rgb_matrix_increase_hue(); } else { - rgblight_decrease_hue(); + rgb_matrix_decrease_hue(); } } break; case 2: { if (clockwise) { - rgblight_increase_val(); + rgb_matrix_increase_val(); } else { - rgblight_decrease_val(); + rgb_matrix_decrease_val(); } } break; case 3: { if (clockwise) { - anim++; + rgb_matrix_step(); } else { - anim--; + rgb_matrix_step_reverse(); } - if (anim >= RGB_MATRIX_EFFECT_MAX) { - anim = 0; - } else if (anim < 0) { - anim = RGB_MATRIX_EFFECT_MAX - 1; - } - rgblight_mode(anim); } break; } diff --git a/keyboards/cxt_studio/keyboard.json b/keyboards/cxt_studio/12e4/keyboard.json similarity index 98% rename from keyboards/cxt_studio/keyboard.json rename to keyboards/cxt_studio/12e4/keyboard.json index 7ee7b52d50ce..b48e75f4caa5 100644 --- a/keyboards/cxt_studio/keyboard.json +++ b/keyboards/cxt_studio/12e4/keyboard.json @@ -1,6 +1,6 @@ { "manufacturer": "CXT", - "keyboard_name": "cxt_studio", + "keyboard_name": "cxt_studio 12E4", "maintainer": "ColinKinloch", "bootloader": "atmel-dfu", "diode_direction": "ROW2COL", diff --git a/keyboards/cxt_studio/keymaps/default/keymap.json b/keyboards/cxt_studio/12e4/keymaps/default/keymap.json similarity index 90% rename from keyboards/cxt_studio/keymaps/default/keymap.json rename to keyboards/cxt_studio/12e4/keymaps/default/keymap.json index 9e31833520e1..b05d3ba1793b 100644 --- a/keyboards/cxt_studio/keymaps/default/keymap.json +++ b/keyboards/cxt_studio/12e4/keymaps/default/keymap.json @@ -1,5 +1,5 @@ { - "keyboard": "cxt_studio", + "keyboard": "cxt_studio/12e4", "keymap": "default", "layout": "LAYOUT", "layers": [ diff --git a/keyboards/cxt_studio/readme.md b/keyboards/cxt_studio/12e4/readme.md similarity index 83% rename from keyboards/cxt_studio/readme.md rename to keyboards/cxt_studio/12e4/readme.md index 6397a3fdfd5d..760c3544b41a 100644 --- a/keyboards/cxt_studio/readme.md +++ b/keyboards/cxt_studio/12e4/readme.md @@ -1,20 +1,20 @@ -# cxt_studio +# cxt_studio/12e4 -![cxt_studio](https://i.imgur.com/AMCTioSh.jpeg) +![cxt_studio/12e4](https://i.imgur.com/AMCTioSh.jpeg) 3x4 ortho rgb lighting 4 knobs. * Keyboard Maintainer: [Colin Kinloch](https://github.com/ColinKinloch) -* Hardware Supported: CXT-Studio +* Hardware Supported: CXT-Studio/12E4 * Hardware Availability: AliExpress. I think the manufacturer is on Taobao. Make example for this keyboard (after setting up your build environment): - make cxt_studio:default + make cxt_studio/12e4:default Flashing example for this keyboard: - make cxt_studio:default:flash + make cxt_studio/12e4: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). diff --git a/keyboards/cxt_studio/config.h b/keyboards/cxt_studio/config.h deleted file mode 100644 index e56e07a25450..000000000000 --- a/keyboards/cxt_studio/config.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2023 Colin Kinloch (@ColinKinloch) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 9 - -/* - * 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