move pocsag demodulator to digiham to fix import problems
This commit is contained in:
parent
271bd723bc
commit
90ed47a115
@ -1,9 +1,10 @@
|
||||
from csdr.chain.demodulator import BaseDemodulatorChain, FixedAudioRateChain, FixedIfSampleRateChain, DialFrequencyReceiver, MetaProvider, SlotFilterChain, DemodulatorError
|
||||
from csdr.chain.demodulator import BaseDemodulatorChain, FixedAudioRateChain, FixedIfSampleRateChain, DialFrequencyReceiver, MetaProvider, SlotFilterChain, DemodulatorError, ServiceDemodulator
|
||||
from pycsdr.modules import FmDemod, Agc, Writer, Buffer
|
||||
from pycsdr.types import Format
|
||||
from digiham.modules import DstarDecoder, DcBlock, FskDemodulator, GfskDemodulator, DigitalVoiceFilter, MbeSynthesizer, NarrowRrcFilter, NxdnDecoder, DmrDecoder, WideRrcFilter, YsfDecoder
|
||||
from digiham.modules import DstarDecoder, DcBlock, FskDemodulator, GfskDemodulator, DigitalVoiceFilter, MbeSynthesizer, NarrowRrcFilter, NxdnDecoder, DmrDecoder, WideRrcFilter, YsfDecoder, PocsagDecoder
|
||||
from digiham.ambe import Modes, ServerError
|
||||
from owrx.meta import MetaParser
|
||||
from owrx.pocsag import PocsagParser
|
||||
|
||||
|
||||
class DigihamChain(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain, DialFrequencyReceiver, MetaProvider):
|
||||
@ -109,3 +110,24 @@ class Ysf(DigihamChain):
|
||||
filter=WideRrcFilter(),
|
||||
codecserver=codecserver
|
||||
)
|
||||
|
||||
|
||||
class PocsagDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self):
|
||||
self.parser = PocsagParser()
|
||||
workers = [
|
||||
FmDemod(),
|
||||
FskDemodulator(samplesPerSymbol=40, invert=True),
|
||||
PocsagDecoder(),
|
||||
self.parser,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 48000
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
@ -5,8 +5,6 @@ from owrx.aprs import Ax25Parser, AprsParser
|
||||
from pycsdr.modules import Convert, FmDemod, Agc, TimingRecovery, DBPskDecoder, VaricodeDecoder
|
||||
from pycsdr.types import Format
|
||||
from owrx.aprs.module import DirewolfModule
|
||||
from digiham.modules import FskDemodulator, PocsagDecoder
|
||||
from owrx.pocsag import PocsagParser
|
||||
|
||||
|
||||
class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
@ -45,27 +43,6 @@ class PacketDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class PocsagDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self):
|
||||
self.parser = PocsagParser()
|
||||
workers = [
|
||||
FmDemod(),
|
||||
FskDemodulator(samplesPerSymbol=40, invert=True),
|
||||
PocsagDecoder(),
|
||||
self.parser,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 48000
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class PskDemodulator(SecondaryDemodulator, SecondarySelectorChain):
|
||||
def __init__(self, baudRate: float):
|
||||
self.baudRate = baudRate
|
||||
|
@ -589,7 +589,7 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
||||
from csdr.chain.digimodes import PacketDemodulator
|
||||
return PacketDemodulator()
|
||||
elif mod == "pocsag":
|
||||
from csdr.chain.digimodes import PocsagDemodulator
|
||||
from csdr.chain.digiham import PocsagDemodulator
|
||||
return PocsagDemodulator()
|
||||
elif mod == "bpsk31":
|
||||
from csdr.chain.digimodes import PskDemodulator
|
||||
|
Loading…
Reference in New Issue
Block a user