diff options
author | QMK Bot <hello@qmk.fm> | 2022-07-08 21:50:28 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-07-08 21:50:28 +0000 |
commit | 30f2556ae99039c7b296c268b9002e6a40d43279 (patch) | |
tree | b3766578ba40b736524d3150f8dcc0fef7bd27e5 /lib/python/qmk | |
parent | 345e19f691f067aeeb237c3f59ee710e13643182 (diff) | |
parent | 06310e81e9ddebcfc5e25b826bfe4914375de14e (diff) | |
download | qmk_firmware-30f2556ae99039c7b296c268b9002e6a40d43279.tar.gz qmk_firmware-30f2556ae99039c7b296c268b9002e6a40d43279.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk')
-rw-r--r-- | lib/python/qmk/info.py | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index d308de9db8..dac2fd6e9e 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -374,7 +374,7 @@ def _extract_split_right_pins(info_data, config_c): unused_pins = unused_pin_text.replace('{', '').replace('}', '').strip() if isinstance(unused_pin_text, str) else None direct_pins = config_c.get('DIRECT_PINS_RIGHT', '').replace(' ', '')[1:-1] - if row_pins and col_pins: + if row_pins or col_pins or direct_pins or unused_pins: if info_data.get('split', {}).get('matrix_pins', {}).get('right') in info_data: _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') @@ -387,37 +387,17 @@ def _extract_split_right_pins(info_data, config_c): if 'right' not in info_data['split']['matrix_pins']: info_data['split']['matrix_pins']['right'] = {} - info_data['split']['matrix_pins']['right'] = { - 'cols': _extract_pins(col_pins), - 'rows': _extract_pins(row_pins), - } - - if direct_pins: - if info_data.get('split', {}).get('matrix_pins', {}).get('right', {}): - _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') - - if 'split' not in info_data: - info_data['split'] = {} + if col_pins: + info_data['split']['matrix_pins']['right']['cols'] = _extract_pins(col_pins) - if 'matrix_pins' not in info_data['split']: - info_data['split']['matrix_pins'] = {} + if row_pins: + info_data['split']['matrix_pins']['right']['rows'] = _extract_pins(row_pins) - if 'right' not in info_data['split']['matrix_pins']: - info_data['split']['matrix_pins']['right'] = {} - - info_data['split']['matrix_pins']['right']['direct'] = _extract_direct_matrix(direct_pins) - - if unused_pins: - if 'split' not in info_data: - info_data['split'] = {} - - if 'matrix_pins' not in info_data['split']: - info_data['split']['matrix_pins'] = {} - - if 'right' not in info_data['split']['matrix_pins']: - info_data['split']['matrix_pins']['right'] = {} + if direct_pins: + info_data['split']['matrix_pins']['right']['direct'] = _extract_direct_matrix(direct_pins) - info_data['split']['matrix_pins']['right']['unused'] = _extract_pins(unused_pins) + if unused_pins: + info_data['split']['matrix_pins']['right']['unused'] = _extract_pins(unused_pins) def _extract_matrix_info(info_data, config_c): |