Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Fixes to make snes_macropad play nicer with qmk configurator #22432

Merged
merged 3 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions keyboards/snes_macropad/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},

{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2, "y": 4},
{"matrix": [4, 3], "x": 3, "y": 4},
{"matrix": [5, 0], "x": 0, "y": 5},
{"matrix": [5, 1], "x": 1, "y": 5},
{"matrix": [5, 2], "x": 2, "y": 5},
{"matrix": [5, 3], "x": 3, "y": 5}
{"matrix": [3, 0], "x": 5.2, "y": 0, "w": 2, "h": 0.75},
{"matrix": [3, 1], "x": 10.65, "y": 0, "w": 2, "h": 0.75},
{"matrix": [3, 2], "x": 7.9, "y": 2.5, "w": 1, "h": 0.75},
{"matrix": [3, 3], "x": 8.9, "y": 2.5, "w": 1, "h": 0.75},
{"matrix": [4, 0], "x": 6, "y": 1, "w": 0.85, "h": 0.85},
{"matrix": [4, 1], "x": 6, "y": 3, "w": 0.85, "h": 0.85},
{"matrix": [4, 2], "x": 5.2, "y": 2, "w": 0.85, "h": 0.85},
{"matrix": [4, 3], "x": 6.8, "y": 2, "w": 0.85, "h": 0.85},
{"matrix": [5, 0], "x": 11.8, "y": 2, "w": 0.85, "h": 0.85},
{"matrix": [5, 1], "x": 11, "y": 3, "w": 0.85, "h": 0.85},
{"matrix": [5, 2], "x": 11, "y": 1, "w": 0.85, "h": 0.85},
{"matrix": [5, 3], "x": 10.2, "y": 2, "w": 0.85, "h": 0.85}
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion keyboards/snes_macropad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on

const char* get_layer_name_user(int layer) {
const char* get_layer_name_user(uint8_t layer) {
switch (layer) {
case L_Numpad:
return "Numpad";
Expand Down
2 changes: 1 addition & 1 deletion keyboards/snes_macropad/keymaps/jbarberu/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on

const char * get_layer_name_user(int layer) {
const char * get_layer_name_user(uint8_t layer) {
switch (layer) {
case L_Numpad:
return "Numpad";
Expand Down
2 changes: 1 addition & 1 deletion keyboards/snes_macropad/keymaps/test/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on

const char * get_layer_name_user(int layer) {
const char * get_layer_name_user(uint8_t layer) {
switch (layer) {
case L_Numpad:
return "Numpad";
Expand Down
4 changes: 2 additions & 2 deletions keyboards/snes_macropad/snes_macropad.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ static void oled_render_keylog(void) {
oled_write_char(key_name, false);
}

__attribute__((weak)) const char * get_layer_name_user(int layer) {
return "Unknown";
__attribute__((weak)) const char * get_layer_name_user(uint8_t layer) {
return get_u8_str(layer, ' ');
}

static void oled_render_layer(void) {
Expand Down