summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2023-12-02 23:50:34 +0200
committerGitHub <noreply@github.com>2023-12-02 21:50:34 +0000
commitb68e89f8466d6b0f33543a34db84acdbae46f734 (patch)
tree68bcdccd68d19b34d20f628b96b6d2ba7467ad65
parentafa0eab37462e9335832190dedd040679d9cb746 (diff)
Don't print error message when there are no row pins and no col pins (#20104)
* Don't print error message when there are no row pins and no col pins This error message could be triggered for example if MATRIX_IO_DELAY is configured in config.h, but the matrix is a custom one. The custom matrix can still call back to existing delay functions that make use of the MATRIX_IO_DELAY macro. In this case 'matrix_pins' in info_data will be true, but there will be no 'direct' 'cols' or 'rows' in info_data['matrix_pins'], and without this commit it would trigger an invalid error. * Update lib/python/qmk/info.py Co-authored-by: Nick Brassel <nick@tzarc.org> --------- Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
-rw-r--r--lib/python/qmk/info.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 3efd34555c..d51741ecb6 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -743,6 +743,9 @@ def _check_matrix(info_data):
elif 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']:
col_count = len(info_data['matrix_pins']['cols'])
row_count = len(info_data['matrix_pins']['rows'])
+ elif 'cols' not in info_data['matrix_pins'] and 'rows' not in info_data['matrix_pins']:
+ # This case caters for custom matrix implementations where normal rows/cols are specified
+ return
if col_count != actual_col_count and col_count != (actual_col_count / 2):
# FIXME: once we can we should detect if split is enabled to do the actual_col_count/2 check.