Skip to content

Commit

Permalink
Fix MATRIX_COLS and MATRIX_ROWS generation for custom matrix (#19508)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sigprof authored Jan 5, 2023
1 parent 64508ca commit 4a7d65b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/python/qmk/cli/generate/config_h.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))

Expand Down

0 comments on commit 4a7d65b

Please sign in to comment.