add ssb chain
This commit is contained in:
parent
be093b8b05
commit
2bcb62e706
@ -38,6 +38,7 @@ from csdr.pipe import Pipe
|
||||
from csdr.chain.demodulator import DemodulatorChain
|
||||
from csdr.chain.fm import Fm
|
||||
from csdr.chain.am import Am
|
||||
from csdr.chain.ssb import Ssb
|
||||
|
||||
import logging
|
||||
|
||||
@ -126,6 +127,9 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
elif which == "am":
|
||||
self.pycsdr_chain = DemodulatorChain(self.samp_rate, self.get_audio_rate(), 0.0, Am())
|
||||
return self.pycsdr_chain
|
||||
elif which == "ssb":
|
||||
self.pycsdr_chain = DemodulatorChain(self.samp_rate, self.get_audio_rate(), 0.0, Ssb())
|
||||
return self.pycsdr_chain
|
||||
|
||||
chain = ["nc -v 127.0.0.1 {nc_port}"]
|
||||
chain += ["csdr shift_addfast_cc --fifo {shift_pipe}"]
|
||||
|
19
csdr/chain/ssb.py
Normal file
19
csdr/chain/ssb.py
Normal file
@ -0,0 +1,19 @@
|
||||
from csdr.chain import Chain
|
||||
from csdr.chain.demodulator import Demodulator
|
||||
from pycsdr.modules import RealPart, Agc, Convert
|
||||
from pycsdr.types import Format
|
||||
|
||||
|
||||
class Ssb(Demodulator):
|
||||
def __init__(self):
|
||||
workers = [
|
||||
RealPart(),
|
||||
# empty chain as placeholder for the "last decimation"
|
||||
Chain(),
|
||||
Agc(Format.FLOAT),
|
||||
Convert(Format.FLOAT, Format.SHORT),
|
||||
]
|
||||
super().__init__(*workers)
|
||||
|
||||
def setLastDecimation(self, decimation: Chain):
|
||||
self.replace(1, decimation)
|
Loading…
Reference in New Issue
Block a user