summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb/sol3/rev1
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2023-06-19 09:46:27 -0600
committerGitHub <noreply@github.com>2023-06-19 09:46:27 -0600
commitc4a67d3f3302f3096bb6b15921c9587643164ba9 (patch)
treebf10e469333ba42b708e76cfc085eb450d92359e /keyboards/rgbkb/sol3/rev1
parent74fbd5a0313769655914166bc872d41461509bd3 (diff)
Remove encoder in-matrix workaround code (#20389)
Diffstat (limited to 'keyboards/rgbkb/sol3/rev1')
-rw-r--r--keyboards/rgbkb/sol3/rev1/info.json14
-rw-r--r--keyboards/rgbkb/sol3/rev1/rev1.c32
2 files changed, 4 insertions, 42 deletions
diff --git a/keyboards/rgbkb/sol3/rev1/info.json b/keyboards/rgbkb/sol3/rev1/info.json
index 6db25dab19..d8c1280239 100644
--- a/keyboards/rgbkb/sol3/rev1/info.json
+++ b/keyboards/rgbkb/sol3/rev1/info.json
@@ -136,20 +136,6 @@
{"matrix": [10, 1], "x": 14.5, "y": 4},
{"matrix": [10, 0], "x": 15.5, "y": 4, "w": 1.5},
- {"matrix": [5, 0], "x": 0, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [5, 1], "x": 0.8, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [5, 2], "x": 1.6, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [5, 3], "x": 2.4, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [5, 4], "x": 3.2, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [5, 5], "x": 4, "y": 7, "w": 0.8, "h": 0.8},
-
- {"matrix": [11, 0], "x": 12.2, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [11, 1], "x": 13, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [11, 2], "x": 13.8, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [11, 3], "x": 14.6, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [11, 4], "x": 15.4, "y": 7, "w": 0.8, "h": 0.8},
- {"matrix": [11, 5], "x": 16.2, "y": 7, "w": 0.8, "h": 0.8},
-
{"matrix": [0, 7], "x": 0, "y": 7.8, "w": 0.8, "h": 0.8},
{"matrix": [1, 7], "x": 0.8, "y": 7.8, "w": 0.8, "h": 0.8},
{"matrix": [2, 7], "x": 1.6, "y": 7.8, "w": 0.8, "h": 0.8},
diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c
index ff330a83d6..e853ed9b98 100644
--- a/keyboards/rgbkb/sol3/rev1/rev1.c
+++ b/keyboards/rgbkb/sol3/rev1/rev1.c
@@ -13,27 +13,12 @@
#define NUMBER_OF_TOUCH_ENCODERS 2
#define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2
-#define NUMBER_OF_ENCODERS 6
-#define ENCODER_OPTIONS 2
-
typedef struct PACKED {
uint8_t r;
uint8_t c;
} encodermap_t;
-// this maps encoders and then touch encoders to their respective electrical matrix entry
-// mapping is row (y) then column (x) when looking at the electrical layout
-const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] =
-{
- { { 5, 0 }, { 5, 1 } }, // Encoder 0 matrix entries
- { { 5, 2 }, { 5, 3 } }, // Encoder 1 matrix entries
- { { 5, 4 }, { 5, 5 } }, // Encoder 2 matrix entries
- { { 11, 0 }, { 11, 1 } }, // Encoder 3 matrix entries
- { { 11, 2 }, { 11, 3 } }, // Encoder 4 matrix entries
- { { 11, 4 }, { 11, 5 } } // Encoder 5 matrix entries
-};
-
-const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] =
+const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] =
{
{ { 1, 7 }, { 0, 7 }, { 2, 7 }, { 5, 6 }, { 5, 7 }, }, // Touch Encoder 0 matrix entries
{ { 7, 7 }, { 6, 7 }, { 8, 7 }, { 11, 6 }, { 11, 7 }, } // Touch Encoder 1 matrix entries
@@ -43,7 +28,7 @@ static bool limit_lightning = true;
RGB rgb_matrix_hsv_to_rgb(HSV hsv) {
if (limit_lightning) hsv.v /= 2;
- return hsv_to_rgb(hsv);
+ return hsv_to_rgb(hsv);
}
bool dip_switch_update_kb(uint8_t index, bool active) {
@@ -72,15 +57,6 @@ static void process_encoder_matrix(encodermap_t pos) {
action_exec(MAKE_KEYEVENT(pos.r, pos.c, false));
}
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise))
- return false;
-
- // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1
- process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]);
- return false;
-}
-
bool touch_encoder_update_kb(uint8_t index, bool clockwise) {
if (!touch_encoder_update_user(index, clockwise))
return false;
@@ -189,7 +165,7 @@ void rgb_matrix_increase_flags(void)
#endif
-__attribute__((weak))
+__attribute__((weak))
void render_layer_status(void) {
// Keymap specific, expected to be overridden
// Host Keyboard Layer Status
@@ -245,7 +221,7 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
bool oled_task_kb(void) {
if (!oled_task_user())
return false;
-
+
if (is_keyboard_left()) {
render_icon();
oled_write_P(PSTR(" "), false);