add js8 decoding if available
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
from owrx.config import Config
|
||||
from owrx.meta import MetaParser
|
||||
from owrx.wsjt import WsjtParser
|
||||
from owrx.js8 import Js8Parser
|
||||
from owrx.aprs import AprsParser
|
||||
from owrx.pocsag import PocsagParser
|
||||
from owrx.source import SdrSource
|
||||
@ -22,6 +22,7 @@ class DspManager(csdr.output):
|
||||
"wsjt_demod": WsjtParser(self.handler),
|
||||
"packet_demod": AprsParser(self.handler),
|
||||
"pocsag_demod": PocsagParser(self.handler),
|
||||
"js8_demod": Js8Parser(self.handler),
|
||||
}
|
||||
|
||||
self.props = PropertyStack()
|
||||
|
@ -40,6 +40,7 @@ class FeatureDetector(object):
|
||||
"wsjt-x": ["wsjtx", "sox"],
|
||||
"packet": ["direwolf", "sox"],
|
||||
"pocsag": ["digiham", "sox"],
|
||||
"js8call": ["js8", "sox"],
|
||||
}
|
||||
|
||||
def feature_availability(self):
|
||||
@ -370,6 +371,12 @@ class FeatureDetector(object):
|
||||
"""
|
||||
return reduce(and_, map(self.command_is_runnable, ["jt9", "wsprd"]), True)
|
||||
|
||||
def has_js8(self):
|
||||
"""
|
||||
To decode JS8, you will need to install [JS8Call](http://js8call.com/)
|
||||
"""
|
||||
return self.command_is_runnable("js8")
|
||||
|
||||
def has_alsa(self):
|
||||
"""
|
||||
Some SDR receivers are identifying themselves as a soundcard. In order to read their data, OpenWebRX relies
|
||||
|
32
owrx/js8.py
Normal file
32
owrx/js8.py
Normal file
@ -0,0 +1,32 @@
|
||||
from .wsjt import WsjtChopper
|
||||
from .parser import Parser
|
||||
import re
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Js8Chopper(WsjtChopper):
|
||||
def getInterval(self):
|
||||
return 15
|
||||
|
||||
def getFileTimestampFormat(self):
|
||||
return "%y%m%d_%H%M%S"
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
return ["js8", "--js8", "-d", str(self.decoding_depth("js8")), file]
|
||||
|
||||
|
||||
class Js8Parser(Parser):
|
||||
decoderRegex = re.compile(" ?<Decode(Started|Debug|Finished)>")
|
||||
|
||||
def parse(self, raw):
|
||||
freq, raw_msg = raw
|
||||
self.setDialFrequency(freq)
|
||||
msg = raw_msg.decode().rstrip()
|
||||
if Js8Parser.decoderRegex.match(msg):
|
||||
return
|
||||
if msg.startswith(" EOF on input file"):
|
||||
return
|
||||
logger.debug(msg)
|
Reference in New Issue
Block a user