summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-10-15 05:29:01 +0300
committerDevaev Maxim <[email protected]>2019-10-15 05:29:15 +0300
commite58ad66da98917d66f58731d041d4ddbe18befed (patch)
treecf9d0c9a92eac227427b352d607558733db13fa9 /kvmd/apps
parenta88ad42501e3afd49bb02f186e787b6e14474640 (diff)
some validation
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index bfb4263e..9fd536a5 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -68,6 +68,8 @@ from ..validators.kvm import valid_stream_quality
from ..validators.kvm import valid_stream_fps
from ..validators.hw import valid_gpio_pin_optional
+from ..validators.hw import valid_otg_gadget
+from ..validators.hw import valid_otg_id
# =====
@@ -247,9 +249,9 @@ def _get_config_scheme() -> Dict:
},
"otg": {
- "gadget": Option("kvmd"),
- "vendor_id": Option(0x1D6B, type=valid_number), # Linux Foundation
- "product_id": Option(0x0104, type=valid_number), # Multifunction Composite Gadget
+ "gadget": Option("kvmd", type=valid_otg_gadget),
+ "vendor_id": Option(0x1D6B, type=valid_otg_id), # Linux Foundation
+ "product_id": Option(0x0104, type=valid_otg_id), # Multifunction Composite Gadget
"manufacturer": Option("Pi-KVM"),
"product": Option("Composite KVM Device"),
"serial_number": Option("CAFEBABE"),