From 99b4a25de7b4874882bbeee9f17cbb08f127466a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 14 Apr 2020 21:27:50 +0200 Subject: [PATCH] js8 service --- owrx/service/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/owrx/service/__init__.py b/owrx/service/__init__.py index 5498e5e..8310fa4 100644 --- a/owrx/service/__init__.py +++ b/owrx/service/__init__.py @@ -5,10 +5,12 @@ from owrx.bands import Bandplan from csdr.csdr import dsp, output from owrx.wsjt import WsjtParser from owrx.aprs import AprsParser +from owrx.js8 import Js8Parser from owrx.config import Config from owrx.source.resampler import Resampler from owrx.feature import FeatureDetector from owrx.property import PropertyLayer +from js8py import Js8Frame from abc import ABCMeta, abstractmethod from .schedule import ServiceScheduler from functools import reduce @@ -50,6 +52,14 @@ class AprsServiceOutput(ServiceOutput): return t == "packet_demod" +class Js8ServiceOutput(ServiceOutput): + def getParser(self): + return Js8Parser(Js8Handler()) + + def supports_type(self, t): + return t == "js8_demod" + + class ServiceDetector(object): requirements = { "ft8": ["wsjt-x"], @@ -58,6 +68,7 @@ class ServiceDetector(object): "jt9": ["wsjt-x"], "wspr": ["wsjt-x"], "packet": ["packet"], + "js8": ["js8call"], } @staticmethod @@ -258,6 +269,8 @@ class ServiceHandler(object): # TODO selecting outputs will need some more intelligence here if mode == "packet": output = AprsServiceOutput(frequency) + elif mode == "js8": + output = Js8ServiceOutput(frequency) else: output = WsjtServiceOutput(frequency) d = dsp(output) @@ -293,6 +306,11 @@ class AprsHandler(object): pass +class Js8Handler(object): + def write_js8_message(self, frame: Js8Frame, freq: int): + pass + + class Services(object): handlers = []