Fix incorrect g_led_config generation (#18431)

This commit is contained in:
Ryan 2022-09-21 11:41:18 +10:00 committed by GitHub
parent 89a1374ef4
commit 591701cdf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -613,11 +613,15 @@ def _extract_led_config(info_data, keyboard):
cols = info_data['matrix_size']['cols']
rows = info_data['matrix_size']['rows']
# Assume what feature owns g_led_config
# Determine what feature owns g_led_config
features = info_data.get("features", {})
feature = None
if features.get("rgb_matrix", False):
feature = "rgb_matrix"
if info_data.get("features", {}).get("led_matrix", False):
elif features.get("led_matrix", False):
feature = "led_matrix"
if feature:
# Process
for file in find_keyboard_c(keyboard):
try: