mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
led colors
This commit is contained in:
@@ -330,16 +330,19 @@ class UserGpio:
|
||||
else:
|
||||
parts = list(map(str.strip, item.split("|", 1)))
|
||||
if parts:
|
||||
if parts[0] in self.__inputs:
|
||||
channel: str = parts[0]
|
||||
param: Optional[str] = (parts[1] if len(parts) > 1 else None)
|
||||
if channel in self.__inputs:
|
||||
items.append({
|
||||
"type": UserGpioModes.INPUT,
|
||||
"channel": parts[0],
|
||||
"channel": channel,
|
||||
"color": (param if param in ["green", "yellow", "red"] else "green"),
|
||||
})
|
||||
elif parts[0] in self.__outputs:
|
||||
elif channel in self.__outputs:
|
||||
items.append({
|
||||
"type": UserGpioModes.OUTPUT,
|
||||
"channel": parts[0],
|
||||
"text": (parts[1] if len(parts) > 1 else "Click"),
|
||||
"text": (param if param is not None else "Click"),
|
||||
})
|
||||
table.append(items)
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user