Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2023-08-27 03:00:54 +00:00
commit c2324ff646
3 changed files with 9 additions and 0 deletions

View File

@ -69,6 +69,7 @@
"LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"}, "LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
"LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"}, "LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"},
"LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"}, "LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"},
"LED_MATRIX_LED_COUNT": {"info_key": "led_matrix.led_count", "value_type": "int", "to_json": false},
// LUFA Bootloader // LUFA Bootloader
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
@ -107,6 +108,7 @@
"RGB_MATRIX_SPLIT": {"info_key": "rgb_matrix.split_count", "value_type": "array.int"}, "RGB_MATRIX_SPLIT": {"info_key": "rgb_matrix.split_count", "value_type": "array.int"},
"RGB_MATRIX_TIMEOUT": {"info_key": "rgb_matrix.timeout", "value_type": "int"}, "RGB_MATRIX_TIMEOUT": {"info_key": "rgb_matrix.timeout", "value_type": "int"},
"RGB_MATRIX_VAL_STEP": {"info_key": "rgb_matrix.val_steps", "value_type": "int"}, "RGB_MATRIX_VAL_STEP": {"info_key": "rgb_matrix.val_steps", "value_type": "int"},
"RGB_MATRIX_LED_COUNT": {"info_key": "rgb_matrix.led_count", "value_type": "int", "to_json": false},
// RGBLight // RGBLight
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},

View File

@ -38,6 +38,10 @@ def _strip_api_content(info_json):
if 'matrix_pins' in info_json: if 'matrix_pins' in info_json:
info_json.pop('matrix_size', None) info_json.pop('matrix_size', None)
for feature in ['rgb_matrix', 'led_matrix']:
if info_json.get(feature, {}).get("layout", None):
info_json[feature].pop('led_count', None)
return info_json return info_json

View File

@ -706,6 +706,9 @@ def _extract_led_config(info_data, keyboard):
except Exception as e: except Exception as e:
_log_warning(info_data, f'led_config: {file.name}: {e}') _log_warning(info_data, f'led_config: {file.name}: {e}')
if info_data[feature].get("layout", None) and not info_data[feature].get("led_count", None):
info_data[feature]["led_count"] = len(info_data[feature]["layout"])
return info_data return info_data