dmr tdma slot filter control
This commit is contained in:
parent
8e945d4149
commit
2b3123c7cb
@ -671,6 +671,8 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
def set_dmr_filter(self, filter):
|
||||
if self.has_pipe("dmr_control_pipe"):
|
||||
self.pipes["dmr_control_pipe"].write("{0}\n".format(filter))
|
||||
if self.pycsdr_enabled and self.pycsdr_chain is not None and isinstance(self.pycsdr_chain, DemodulatorChain):
|
||||
self.pycsdr_chain.setDmrFilter(filter)
|
||||
|
||||
def set_wfm_deemphasis_tau(self, tau):
|
||||
if self.wfm_deemphasis_tau == tau:
|
||||
|
@ -1,6 +1,7 @@
|
||||
from csdr.chain import Chain
|
||||
from pycsdr.modules import Shift, FirDecimate, Bandpass, Squelch, FractionalDecimator, Writer
|
||||
from pycsdr.types import Format
|
||||
from csdr.chain.digiham import Dmr
|
||||
|
||||
|
||||
class DemodulatorChain(Chain):
|
||||
@ -49,6 +50,10 @@ class DemodulatorChain(Chain):
|
||||
def setMetaWriter(self, writer: Writer):
|
||||
self.demodulator.setMetaWriter(writer)
|
||||
|
||||
def setDmrFilter(self, filter: int) -> None:
|
||||
if isinstance(self.demodulator, Dmr):
|
||||
self.demodulator.setSlotFilter(filter)
|
||||
|
||||
def _getDecimation(self, input_rate, output_rate):
|
||||
if output_rate <= 0:
|
||||
raise ValueError("invalid output rate: {rate}".format(rate=output_rate))
|
||||
|
@ -42,9 +42,13 @@ class Nxdn(DigihamChain):
|
||||
self.mbeMode = Modes.NxdnMode
|
||||
super().__init__(codecserver)
|
||||
|
||||
|
||||
class Dmr(DigihamChain):
|
||||
def __init__(self, codecserver: str = ""):
|
||||
self.fskDemodulator = GfskDemodulator(samplesPerSymbol=10)
|
||||
self.decoder = DmrDecoder()
|
||||
self.mbeMode = Modes.DmrMode
|
||||
super().__init__(codecserver)
|
||||
|
||||
def setSlotFilter(self, filter: int) -> None:
|
||||
self.decoder.setSlotFilter(filter)
|
||||
|
Loading…
Reference in New Issue
Block a user