Revert "Add *_MATRIX_LED_COUNT generation/validation (#19515)" (#21109)

This reverts commit 25c16b3ade.
master
Joel Challis 2023-06-02 02:45:48 +01:00 committed by GitHub
parent 25c16b3ade
commit aa33fb00fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 13 deletions

View File

@ -71,7 +71,6 @@
"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"},
@ -110,7 +109,6 @@
"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

@ -372,7 +372,6 @@
} }
}, },
"driver": {"type": "string"}, "driver": {"type": "string"},
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"center_point": { "center_point": {
"type": "array", "type": "array",
"minItems": 2, "minItems": 2,
@ -424,7 +423,6 @@
} }
}, },
"driver": {"type": "string"}, "driver": {"type": "string"},
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"center_point": { "center_point": {
"type": "array", "type": "array",
"minItems": 2, "minItems": 2,

View File

@ -55,7 +55,7 @@ def _get_key_left_position(key):
return key['x'] - 0.25 if key.get('h', 1) == 2 and key.get('w', 1) == 1.25 else key['x'] return key['x'] - 0.25 if key.get('h', 1) == 2 and key.get('w', 1) == 1.25 else key['x']
def _additional_validation(keyboard, info_data): # noqa: C901 def _additional_validation(keyboard, info_data):
"""Non schema checks """Non schema checks
""" """
layouts = info_data.get('layouts', {}) layouts = info_data.get('layouts', {})
@ -105,14 +105,6 @@ def _additional_validation(keyboard, info_data): # noqa: C901
if not decl.get("aliases", []): if not decl.get("aliases", []):
_log_error(info_data, f'Keycode {decl["key"]} has no short form alias') _log_error(info_data, f'Keycode {decl["key"]} has no short form alias')
# Ensure LED config is somewhat valid
for feature in ['rgb_matrix', 'led_matrix']:
if feature in info_data and all(key in info_data[feature] for key in ["layout", "led_count"]):
layout_count = len(info_data[feature]["layout"])
led_count = info_data[feature]["led_count"]
if led_count != layout_count:
_log_warning(info_data, '%s: mismatch between LED count (%d) and layout items (%d)' % (feature, led_count, layout_count))
def _validate(keyboard, info_data): def _validate(keyboard, info_data):
"""Perform various validation on the provided info.json data """Perform various validation on the provided info.json data