def run(size, chan=None, df=0, success=True, cfg=None): if cfg is None: cfg = config.slowest() tx_data=get_bigger_string(10000) tx_audio = BytesIO() main.send(config=cfg, src=BytesIO(tx_data), dst=tx_audio, gain=0.5) with open('rx_data.wav','w') as f: f.write(tx_audio.getvalue()) f.flush() dst = BytesIO() sampling.resample(src=tx_audio, dst=dst, df=50.0)
def test_configs(): default = config.Configuration() fastest = config.fastest() slowest = config.slowest() assert slowest.modem_bps <= default.modem_bps assert fastest.modem_bps >= default.modem_bps
def test_slowest(): c = config.slowest() assert c.Npoints == 2 assert list(c.symbols) == [-1j, 1j]