summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb/sol3/rev1/rev1.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/rgbkb/sol3/rev1/rev1.c')
-rw-r--r--keyboards/rgbkb/sol3/rev1/rev1.c32
1 files changed, 4 insertions, 28 deletions
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);