summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Vlasov <sigprof@gmail.com>2023-01-06 02:40:53 +0300
committerGitHub <noreply@github.com>2023-01-05 23:40:53 +0000
commit4a7d65b9d74af40fd5f92b58aad250f33f1af86a (patch)
tree8b796523e267f1321f8674696289a9534b5c2552 /lib
parent64508caa76ec6d01ffb33116f6c1c0c4d52093f1 (diff)
Fix MATRIX_COLS and MATRIX_ROWS generation for custom matrix (#19508)
The code which generated the MATRIX_COLS and MATRIX_ROWS defines from the JSON information was checking the presence of the `matrix_pins` key, which may not exist if a custom matrix is used. Check the presence of `matrix_size` instead.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index 31b8d70635..c256ec4531 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -62,7 +62,7 @@ def matrix_pins(matrix_pins, postfix=''):
def generate_matrix_size(kb_info_json, config_h_lines):
"""Add the matrix size to the config.h.
"""
- if 'matrix_pins' in kb_info_json:
+ if 'matrix_size' in kb_info_json:
config_h_lines.append(generate_define('MATRIX_COLS', kb_info_json['matrix_size']['cols']))
config_h_lines.append(generate_define('MATRIX_ROWS', kb_info_json['matrix_size']['rows']))