diff options
Diffstat (limited to 'lib/python/qmk')
| -rw-r--r-- | lib/python/qmk/info.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index bc07f68d7b..7ed636d0f9 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py | |||
| @@ -374,11 +374,9 @@ def _extract_split_right_pins(info_data, config_c): | |||
| 374 | # Figure out the right half matrix pins | 374 | # Figure out the right half matrix pins |
| 375 | row_pins = config_c.get('MATRIX_ROW_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() | 375 | row_pins = config_c.get('MATRIX_ROW_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() |
| 376 | col_pins = config_c.get('MATRIX_COL_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() | 376 | col_pins = config_c.get('MATRIX_COL_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() |
| 377 | unused_pin_text = config_c.get('UNUSED_PINS_RIGHT') | ||
| 378 | unused_pins = unused_pin_text.replace('{', '').replace('}', '').strip() if isinstance(unused_pin_text, str) else None | ||
| 379 | direct_pins = config_c.get('DIRECT_PINS_RIGHT', '').replace(' ', '')[1:-1] | 377 | direct_pins = config_c.get('DIRECT_PINS_RIGHT', '').replace(' ', '')[1:-1] |
| 380 | 378 | ||
| 381 | if row_pins or col_pins or direct_pins or unused_pins: | 379 | if row_pins or col_pins or direct_pins: |
| 382 | if info_data.get('split', {}).get('matrix_pins', {}).get('right') in info_data: | 380 | if info_data.get('split', {}).get('matrix_pins', {}).get('right') in info_data: |
| 383 | _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') | 381 | _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') |
| 384 | 382 | ||
| @@ -400,17 +398,12 @@ def _extract_split_right_pins(info_data, config_c): | |||
| 400 | if direct_pins: | 398 | if direct_pins: |
| 401 | info_data['split']['matrix_pins']['right']['direct'] = _extract_direct_matrix(direct_pins) | 399 | info_data['split']['matrix_pins']['right']['direct'] = _extract_direct_matrix(direct_pins) |
| 402 | 400 | ||
| 403 | if unused_pins: | ||
| 404 | info_data['split']['matrix_pins']['right']['unused'] = _extract_pins(unused_pins) | ||
| 405 | |||
| 406 | 401 | ||
| 407 | def _extract_matrix_info(info_data, config_c): | 402 | def _extract_matrix_info(info_data, config_c): |
| 408 | """Populate the matrix information. | 403 | """Populate the matrix information. |
| 409 | """ | 404 | """ |
| 410 | row_pins = config_c.get('MATRIX_ROW_PINS', '').replace('{', '').replace('}', '').strip() | 405 | row_pins = config_c.get('MATRIX_ROW_PINS', '').replace('{', '').replace('}', '').strip() |
| 411 | col_pins = config_c.get('MATRIX_COL_PINS', '').replace('{', '').replace('}', '').strip() | 406 | col_pins = config_c.get('MATRIX_COL_PINS', '').replace('{', '').replace('}', '').strip() |
| 412 | unused_pin_text = config_c.get('UNUSED_PINS') | ||
| 413 | unused_pins = unused_pin_text.replace('{', '').replace('}', '').strip() if isinstance(unused_pin_text, str) else None | ||
| 414 | direct_pins = config_c.get('DIRECT_PINS', '').replace(' ', '')[1:-1] | 407 | direct_pins = config_c.get('DIRECT_PINS', '').replace(' ', '')[1:-1] |
| 415 | info_snippet = {} | 408 | info_snippet = {} |
| 416 | 409 | ||
| @@ -436,12 +429,6 @@ def _extract_matrix_info(info_data, config_c): | |||
| 436 | 429 | ||
| 437 | info_snippet['direct'] = _extract_direct_matrix(direct_pins) | 430 | info_snippet['direct'] = _extract_direct_matrix(direct_pins) |
| 438 | 431 | ||
| 439 | if unused_pins: | ||
| 440 | if 'matrix_pins' not in info_data: | ||
| 441 | info_data['matrix_pins'] = {} | ||
| 442 | |||
| 443 | info_snippet['unused'] = _extract_pins(unused_pins) | ||
| 444 | |||
| 445 | if config_c.get('CUSTOM_MATRIX', 'no') != 'no': | 432 | if config_c.get('CUSTOM_MATRIX', 'no') != 'no': |
| 446 | if 'matrix_pins' in info_data and 'custom' in info_data['matrix_pins']: | 433 | if 'matrix_pins' in info_data and 'custom' in info_data['matrix_pins']: |
| 447 | _log_warning(info_data, 'Custom Matrix is specified in both info.json and config.h, the config.h values win.') | 434 | _log_warning(info_data, 'Custom Matrix is specified in both info.json and config.h, the config.h values win.') |
