Support RSGB contests

This commit is contained in:
Ian Renton
2026-09-05 09:00:32 +01:00
parent d3d1d20821
commit d6e53c14e9
32 changed files with 256 additions and 98 deletions
+11 -6
View File
@@ -30,7 +30,6 @@ class Mode(str, Enum):
OLIVIA = "OLIVIA"
PKT = "PKT"
MSK144 = "MSK144"
UNKNOWN = "UNKNOWN"
@property
def is_cw(self) -> bool:
@@ -42,14 +41,14 @@ class Mode(str, Enum):
@property
def is_data(self) -> bool:
return not (self.is_cw or self.is_phone or self == Mode.UNKNOWN)
return not (self.is_cw or self.is_phone)
@staticmethod
def from_name(name):
"""Convert a string to an enum mode using the alias table."""
if not name:
return Mode.UNKNOWN
return None
try:
return Mode(name.upper())
@@ -57,14 +56,13 @@ class Mode(str, Enum):
try:
return Mode(MODE_ALIASES[name.upper()])
except (KeyError, ValueError):
return Mode.UNKNOWN
return None
class ModeType(str, Enum):
PHONE = "PHONE"
CW = "CW"
DATA = "DATA"
UNKNOWN = "UNKNOWN"
class ModeSource(str, Enum):
@@ -115,7 +113,14 @@ class SIGRefType(str, Enum):
REGION = "REGION"
GRID = "GRID"
TOILET = "TOILET"
UNKNOWN = "UNKNOWN"
class AlertType(str, Enum):
"""Type of an alert."""
XOTA = "XOTA"
DXPEDITION = "DXPEDITION"
CONTEST = "CONTEST"
class SIGType(str, Enum):