summaryrefslogtreecommitdiff
path: root/keyboards/winry
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/winry')
-rw-r--r--keyboards/winry/winry25tc/keymaps/default/keymap.c2
-rw-r--r--keyboards/winry/winry25tc/rules.mk2
-rw-r--r--keyboards/winry/winry315/config.h2
-rw-r--r--keyboards/winry/winry315/keymaps/left_numpad/keymap.c2
-rw-r--r--keyboards/winry/winry315/keymaps/via/config.h9
-rw-r--r--keyboards/winry/winry315/winry315.c56
6 files changed, 5 insertions, 68 deletions
diff --git a/keyboards/winry/winry25tc/keymaps/default/keymap.c b/keyboards/winry/winry25tc/keymaps/default/keymap.c
index ec1d0f42ed..7e741c604c 100644
--- a/keyboards/winry/winry25tc/keymaps/default/keymap.c
+++ b/keyboards/winry/winry25tc/keymaps/default/keymap.c
@@ -23,7 +23,7 @@ enum my_layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FIRST_LAYER] = LAYOUT(
- KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC,
+ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC,
KC_P7, KC_P8, KC_P9, KC_PPLS, RGB_TOG,
KC_P4, KC_P5, KC_P6, KC_PENT, RGB_MOD,
KC_P1, KC_P2, KC_P3, KC_UP, MO(_SECOND_LAYER),
diff --git a/keyboards/winry/winry25tc/rules.mk b/keyboards/winry/winry25tc/rules.mk
index b0352b513c..53a67bd4ae 100644
--- a/keyboards/winry/winry25tc/rules.mk
+++ b/keyboards/winry/winry25tc/rules.mk
@@ -16,4 +16,4 @@ NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-KEY_LOCK_ENABLE = yes # Enable KC_LOCK support
+KEY_LOCK_ENABLE = yes
diff --git a/keyboards/winry/winry315/config.h b/keyboards/winry/winry315/config.h
index 1a9617c1e3..3d0921590e 100644
--- a/keyboards/winry/winry315/config.h
+++ b/keyboards/winry/winry315/config.h
@@ -62,7 +62,7 @@
// RGB Matrix configuration.
#ifdef RGB_MATRIX_ENABLE
-# define DRIVER_LED_TOTAL RGBLED_NUM
+# define RGB_MATRIX_LED_COUNT RGBLED_NUM
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL
# define RGB_MATRIX_CENTER \
diff --git a/keyboards/winry/winry315/keymaps/left_numpad/keymap.c b/keyboards/winry/winry315/keymaps/left_numpad/keymap.c
index 8864b1b45a..caa8811a5d 100644
--- a/keyboards/winry/winry315/keymaps/left_numpad/keymap.c
+++ b/keyboards/winry/winry315/keymaps/left_numpad/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_TOG, RGB_HUD, RGB_HUI,
RGB_M_B, RGB_M_P, RGB_SAD, RGB_SAI,
KC_NO, RGB_VAD, RGB_VAI,
- RGB_M_P, KC_NLCK, RGB_RMOD,RGB_MOD
+ RGB_M_P, KC_NUM, RGB_RMOD,RGB_MOD
),
};
// clang-format on
diff --git a/keyboards/winry/winry315/keymaps/via/config.h b/keyboards/winry/winry315/keymaps/via/config.h
index 5fc0e02531..de1f70c160 100644
--- a/keyboards/winry/winry315/keymaps/via/config.h
+++ b/keyboards/winry/winry315/keymaps/via/config.h
@@ -4,12 +4,3 @@
#pragma once
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
-
-// Enable a limited form of RGB Matrix support in VIA (requires redefining the
-// effect list in the VIA JSON, which then becomes not 100% compatible with the
-// RGBLIGHT firmwares).
-#define VIA_QMK_RGBLIGHT_ENABLE
-
-// Enable the workaround for the speed parameter mismatch between RGBLIGHT and
-// RGB Matrix, so that the speed slider in VIA behaves in a more useful way.
-#define VIA_CUSTOM_LIGHTING_ENABLE
diff --git a/keyboards/winry/winry315/winry315.c b/keyboards/winry/winry315/winry315.c
index c741ffeb74..e7901a2e00 100644
--- a/keyboards/winry/winry315/winry315.c
+++ b/keyboards/winry/winry315/winry315.c
@@ -164,66 +164,12 @@ uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t
return 0;
}
-# if defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE)
-
-// VIA supports only 4 discrete values for effect speed; map these to some
-// useful speed values for RGB Matrix.
-enum speed_values {
- RGBLIGHT_SPEED_0 = UINT8_MAX / 16, // not 0 to avoid really slow effects
- RGBLIGHT_SPEED_1 = UINT8_MAX / 4,
- RGBLIGHT_SPEED_2 = UINT8_MAX / 2, // matches the default value
- RGBLIGHT_SPEED_3 = UINT8_MAX / 4 * 3, // UINT8_MAX is really fast
-};
-
-static uint8_t speed_from_rgblight(uint8_t rgblight_speed) {
- switch (rgblight_speed) {
- case 0:
- return RGBLIGHT_SPEED_0;
- case 1:
- return RGBLIGHT_SPEED_1;
- case 2:
- default:
- return RGBLIGHT_SPEED_2;
- case 3:
- return RGBLIGHT_SPEED_3;
- }
-}
-
-static uint8_t speed_to_rgblight(uint8_t rgb_matrix_speed) {
- if (rgb_matrix_speed < ((RGBLIGHT_SPEED_0 + RGBLIGHT_SPEED_1) / 2)) {
- return 0;
- } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_1 + RGBLIGHT_SPEED_2) / 2)) {
- return 1;
- } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_2 + RGBLIGHT_SPEED_3) / 2)) {
- return 2;
- } else {
- return 3;
- }
-}
-
-void raw_hid_receive_kb(uint8_t *data, uint8_t length) {
- switch (data[0]) {
- case id_lighting_get_value:
- if (data[1] == id_qmk_rgblight_effect_speed) {
- data[2] = speed_to_rgblight(rgb_matrix_get_speed());
- }
- break;
- case id_lighting_set_value:
- if (data[1] == id_qmk_rgblight_effect_speed) {
- rgb_matrix_set_speed_noeeprom(speed_from_rgblight(data[2]));
- }
- break;
- }
-}
-
-# endif // defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE)
-
#endif // defined(RGB_MATRIX_ENABLE)
void winry315_set_orientation(uint8_t orientation) {
(void)orientation;
#if defined(RGB_MATRIX_ENABLE)
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; ++i) {
+ for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) {
led_point_t * dst_point = &g_led_config.point[i];
const led_point_t *src_point = &initial_led_config.point[i];
uint8_t x = pgm_read_byte(&src_point->x);