chore: store more hardware settings in hwdef JSON files (#7031)

This commit is contained in:
philmoz
2026-01-29 11:54:14 +10:00
committed by GitHub
parent 71305d502c
commit 2579bc6132
11 changed files with 290 additions and 134 deletions
+26
View File
@@ -0,0 +1,26 @@
class CFS:
def __init__(self, cfs_rgb_led, cfs_groups):
self.rgb_led = cfs_rgb_led
self.groups = cfs_groups
def parse_cfs(hw_defs):
cfs_rgb_led = 0
cfs_groups = 0
fcfs = f'FUNCTION_SWITCHES'
frgb = f'FUNCTION_SWITCHES_RGB_LEDS'
if fcfs in hw_defs:
if frgb in hw_defs:
cfs_rgb_led = 1
if f'RADIO_GX12' in hw_defs:
cfs_groups = 4
elif f'RADIO_PA01' in hw_defs:
cfs_groups = 2
else:
cfs_groups = 3
return CFS(cfs_rgb_led, cfs_groups)