openwebrx-clone/csdr/chain/fm.py

18 lines
467 B
Python
Raw Normal View History

from csdr.chain import Chain
2021-07-19 17:04:14 +00:00
from pycsdr.modules import FmDemod, Limit, NfmDeemphasis, Agc, Convert
2021-07-20 15:58:32 +00:00
from pycsdr.types import Format, AgcProfile
2021-07-19 17:04:14 +00:00
class Fm(Chain):
2021-07-19 17:04:14 +00:00
def __init__(self, sampleRate: int):
2021-07-20 15:58:32 +00:00
agc = Agc(Format.FLOAT)
agc.setProfile(AgcProfile.SLOW)
agc.setMaxGain(3)
2021-07-19 17:04:14 +00:00
workers = [
FmDemod(),
Limit(),
NfmDeemphasis(sampleRate),
2021-07-20 15:58:32 +00:00
agc,
2021-07-19 17:04:14 +00:00
]
super().__init__(*workers)