mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 08:38:06 +08:00
calib: pep8
This commit is contained in:
@@ -9,9 +9,9 @@ from . import config
|
||||
from . import wave
|
||||
|
||||
CALIBRATION_SYMBOLS = int(1.0 * config.Fs)
|
||||
|
||||
ALLOWED_EXCEPTIONS = (IOError, KeyboardInterrupt)
|
||||
|
||||
|
||||
def send(wave_play=wave.play):
|
||||
t = np.arange(0, CALIBRATION_SYMBOLS) * config.Ts
|
||||
signal = [np.sin(2 * np.pi * f * t) for f in config.frequencies]
|
||||
@@ -30,6 +30,7 @@ def send(wave_play=wave.play):
|
||||
|
||||
FRAME_LENGTH = 100 * config.Nsym
|
||||
|
||||
|
||||
def recorder(process):
|
||||
frame_size = int(wave.bytes_per_sample * FRAME_LENGTH)
|
||||
fd = process.stdout
|
||||
@@ -46,6 +47,7 @@ def recorder(process):
|
||||
finally:
|
||||
process.kill()
|
||||
|
||||
|
||||
def recv(wave_record=wave.record, log=sys.stdout.write):
|
||||
t = np.arange(0, FRAME_LENGTH) * config.Ts
|
||||
carriers = [np.exp(2j * np.pi * f * t) for f in config.frequencies]
|
||||
|
||||
Reference in New Issue
Block a user