|
|
@ -613,20 +613,24 @@ def _extract_led_config(info_data, keyboard): |
|
|
|
cols = info_data['matrix_size']['cols'] |
|
|
|
cols = info_data['matrix_size']['cols'] |
|
|
|
rows = info_data['matrix_size']['rows'] |
|
|
|
rows = info_data['matrix_size']['rows'] |
|
|
|
|
|
|
|
|
|
|
|
# Assume what feature owns g_led_config |
|
|
|
# Determine what feature owns g_led_config |
|
|
|
feature = "rgb_matrix" |
|
|
|
features = info_data.get("features", {}) |
|
|
|
if info_data.get("features", {}).get("led_matrix", False): |
|
|
|
feature = None |
|
|
|
|
|
|
|
if features.get("rgb_matrix", False): |
|
|
|
|
|
|
|
feature = "rgb_matrix" |
|
|
|
|
|
|
|
elif features.get("led_matrix", False): |
|
|
|
feature = "led_matrix" |
|
|
|
feature = "led_matrix" |
|
|
|
|
|
|
|
|
|
|
|
# Process |
|
|
|
if feature: |
|
|
|
for file in find_keyboard_c(keyboard): |
|
|
|
# Process |
|
|
|
try: |
|
|
|
for file in find_keyboard_c(keyboard): |
|
|
|
ret = find_led_config(file, cols, rows) |
|
|
|
try: |
|
|
|
if ret: |
|
|
|
ret = find_led_config(file, cols, rows) |
|
|
|
info_data[feature] = info_data.get(feature, {}) |
|
|
|
if ret: |
|
|
|
info_data[feature]["layout"] = ret |
|
|
|
info_data[feature] = info_data.get(feature, {}) |
|
|
|
except Exception as e: |
|
|
|
info_data[feature]["layout"] = ret |
|
|
|
_log_warning(info_data, f'led_config: {file.name}: {e}') |
|
|
|
except Exception as e: |
|
|
|
|
|
|
|
_log_warning(info_data, f'led_config: {file.name}: {e}') |
|
|
|
|
|
|
|
|
|
|
|
return info_data |
|
|
|
return info_data |
|
|
|
|
|
|
|
|
|
|
|