From b2e15c559e1c28c900ffd9ae18e490fcdaa3fa5b Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 20 Sep 2021 15:32:26 +0200 Subject: [PATCH] refactor --- csdr/chain/drm.py | 2 +- csdr/chain/freedv.py | 2 +- csdr/chain/m17.py | 4 ++-- {owrx => csdr/module}/drm.py | 0 {owrx => csdr/module}/freedv.py | 0 {owrx => csdr/module}/m17.py | 0 owrx/aprs/direwolf.py | 2 +- owrx/dsp.py | 4 ++-- 8 files changed, 7 insertions(+), 7 deletions(-) rename {owrx => csdr/module}/drm.py (100%) rename {owrx => csdr/module}/freedv.py (100%) rename {owrx => csdr/module}/m17.py (100%) diff --git a/csdr/chain/drm.py b/csdr/chain/drm.py index 12c9d3b..7aa58eb 100644 --- a/csdr/chain/drm.py +++ b/csdr/chain/drm.py @@ -1,7 +1,7 @@ from csdr.chain.demodulator import BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain from pycsdr.modules import Convert, Downmix from pycsdr.types import Format -from owrx.drm import DrmModule +from csdr.module.drm import DrmModule class Drm(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain): diff --git a/csdr/chain/freedv.py b/csdr/chain/freedv.py index d3f2730..97e2061 100644 --- a/csdr/chain/freedv.py +++ b/csdr/chain/freedv.py @@ -1,5 +1,5 @@ from csdr.chain.demodulator import BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain -from owrx.freedv import FreeDVModule +from csdr.module.freedv import FreeDVModule from pycsdr.modules import RealPart, Agc, Convert from pycsdr.types import Format diff --git a/csdr/chain/m17.py b/csdr/chain/m17.py index 4c21d47..2f12cca 100644 --- a/csdr/chain/m17.py +++ b/csdr/chain/m17.py @@ -1,11 +1,11 @@ from csdr.chain.demodulator import BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain -from owrx.m17 import M17Module +from csdr.module.m17 import M17Module from pycsdr.modules import FmDemod, Limit, Convert from pycsdr.types import Format from digiham.modules import DcBlock -class M17Chain(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain): +class M17(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain): def __init__(self): workers = [ FmDemod(), diff --git a/owrx/drm.py b/csdr/module/drm.py similarity index 100% rename from owrx/drm.py rename to csdr/module/drm.py diff --git a/owrx/freedv.py b/csdr/module/freedv.py similarity index 100% rename from owrx/freedv.py rename to csdr/module/freedv.py diff --git a/owrx/m17.py b/csdr/module/m17.py similarity index 100% rename from owrx/m17.py rename to csdr/module/m17.py diff --git a/owrx/aprs/direwolf.py b/owrx/aprs/direwolf.py index 5cb5853..8237f97 100644 --- a/owrx/aprs/direwolf.py +++ b/owrx/aprs/direwolf.py @@ -16,7 +16,7 @@ class DirewolfConfigSubscriber(ABC): pass -class DirewolfConfig(object): +class DirewolfConfig: config_keys = [ "aprs_callsign", "aprs_igate_enabled", diff --git a/owrx/dsp.py b/owrx/dsp.py index b27b6ea..c13957c 100644 --- a/owrx/dsp.py +++ b/owrx/dsp.py @@ -10,7 +10,7 @@ from csdr.chain.selector import Selector from csdr.chain.clientaudio import ClientAudioChain from csdr.chain.analog import NFm, WFm, Am, Ssb from csdr.chain.digiham import DigihamChain, Dmr, Dstar, Nxdn, Ysf -from csdr.chain.m17 import M17Chain +from csdr.chain.m17 import M17 from csdr.chain.freedv import FreeDV from csdr.chain.drm import Drm from csdr.chain.fft import FftChain @@ -449,7 +449,7 @@ class DspManager(SdrSourceEventClient): elif demod == "nxdn": return Nxdn(self.props["digital_voice_codecserver"]) elif demod == "m17": - return M17Chain() + return M17() elif demod == "drm": return Drm() elif demod == "freedv":