Sync edgetx to Gitea

This commit is contained in:
2026-08-03 16:37:20 +08:00
commit 14eb5a3fb9
5364 changed files with 2835009 additions and 0 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)