pikvm/pikvm#1408: Additional colors for GPIO

This commit is contained in:
Maxim Devaev
2024-11-26 19:11:59 +02:00
parent 0cf5f8de9e
commit 7fd4dae3c6
2 changed files with 35 additions and 5 deletions

View File

@@ -408,7 +408,7 @@ class UserGpio:
def __make_item_input(self, parts: list[str]) -> dict:
assert len(parts) >= 1
color = (parts[1] if len(parts) > 1 else None)
if color not in ["green", "yellow", "red"]:
if color not in ["green", "yellow", "red", "blue", "cyan", "magenta", "pink", "white"]:
color = "green"
return {
"type": UserGpioModes.INPUT,