add Q65 mode integration
This commit is contained in:
@ -98,6 +98,9 @@ class Modes(object):
|
||||
requirements=["wsjt-x-2-3"],
|
||||
service=True,
|
||||
),
|
||||
DigitalMode(
|
||||
"q65", "Q65", underlying=["usb"], bandpass=Bandpass(0, 3000), requirements=["wsjt-x-2-4"], service=True
|
||||
),
|
||||
DigitalMode(
|
||||
"js8", "JS8Call", underlying=["usb"], bandpass=Bandpass(0, 3000), requirements=["js8call"], service=True
|
||||
),
|
||||
|
@ -18,7 +18,7 @@ class PskReporter(Reporter):
|
||||
interval = 300
|
||||
|
||||
def getSupportedModes(self):
|
||||
return ["FT8", "FT4", "JT9", "JT65", "FST4", "JS8"]
|
||||
return ["FT8", "FT4", "JT9", "JT65", "FST4", "JS8", "Q65"]
|
||||
|
||||
def stop(self):
|
||||
self.cancelTimer()
|
||||
|
32
owrx/wsjt.py
32
owrx/wsjt.py
@ -7,6 +7,7 @@ from owrx.parser import Parser
|
||||
from owrx.audio import AudioChopperProfile
|
||||
from abc import ABC, ABCMeta, abstractmethod
|
||||
from owrx.config import Config
|
||||
from enum import Enum
|
||||
|
||||
import logging
|
||||
|
||||
@ -142,6 +143,37 @@ class Fst4wProfile(WsjtProfile):
|
||||
return [Fst4wProfile(i) for i in profiles if i in Fst4wProfile.availableIntervals]
|
||||
|
||||
|
||||
class Q65Mode(Enum):
|
||||
A = 1
|
||||
B = 2
|
||||
C = 3
|
||||
D = 4
|
||||
E = 5
|
||||
|
||||
|
||||
class Q65Profile(WsjtProfile):
|
||||
availableIntervals = [15, 30, 60, 120, 300]
|
||||
|
||||
def __init__(self, interval, mode: Q65Mode):
|
||||
self.interval = interval
|
||||
self.mode = mode
|
||||
|
||||
def getMode(self):
|
||||
return "Q65"
|
||||
|
||||
def getInterval(self):
|
||||
return self.interval
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
return ["jt9", "--q65", "-p", str(self.interval), "-b", self.mode.name, "-d", str(self.decoding_depth()), file]
|
||||
|
||||
@staticmethod
|
||||
def getEnabledProfiles():
|
||||
config = Config.get()
|
||||
profiles = config["q65_enabled_combinations"] if "q65_enabled_combinations" in config else []
|
||||
return [Q65Profile(i, Q65Mode[m]) for i, m in profiles if i in Fst4wProfile.availableIntervals]
|
||||
|
||||
|
||||
class WsjtParser(Parser):
|
||||
def parse(self, messages):
|
||||
for data in messages:
|
||||
|
Reference in New Issue
Block a user