refactor owrx.form -> owrx.form.input

This commit is contained in:
Jakob Ketterl
2021-04-29 15:17:21 +02:00
parent bc193c834c
commit 35dcff90ea
28 changed files with 49 additions and 48 deletions

16
owrx/form/input/wfm.py Normal file
View File

@@ -0,0 +1,16 @@
from owrx.form.input import DropdownEnum
class WfmTauValues(DropdownEnum):
TAU_50_MICRO = (50e-6, "most regions")
TAU_75_MICRO = (75e-6, "Americas and South Korea")
def __new__(cls, *args, **kwargs):
value, description = args
obj = object.__new__(cls)
obj._value_ = value
obj.description = description
return obj
def __str__(self):
return "{}µs ({})".format(int(self.value * 1e6), self.description)