openwebrx-clone/csdr/chain/am.py

19 lines
456 B
Python
Raw Normal View History

2021-07-19 21:32:03 +00:00
from csdr.chain import Chain
from pycsdr.modules import AmDemod, DcBlock, Agc, Convert
2021-07-20 15:58:32 +00:00
from pycsdr.types import Format, AgcProfile
2021-07-19 21:32:03 +00:00
class Am(Chain):
2021-07-19 21:32:03 +00:00
def __init__(self):
2021-07-20 15:58:32 +00:00
agc = Agc(Format.FLOAT)
agc.setProfile(AgcProfile.SLOW)
agc.setInitialGain(200)
2021-07-19 21:32:03 +00:00
workers = [
AmDemod(),
DcBlock(),
2021-07-20 15:58:32 +00:00
agc,
2021-07-19 21:32:03 +00:00
Convert(Format.FLOAT, Format.SHORT),
]
super().__init__(*workers)