mirror of
https://github.com/romanz/amodem.git
synced 2026-03-23 02:39:26 +08:00
PEP8 fixes
This commit is contained in:
@@ -208,10 +208,12 @@ class Receiver(object):
|
||||
duration = time.time() - self.stats['rx_start']
|
||||
sampler.freq -= 0.01 * err / config.Fc
|
||||
sampler.offset -= err
|
||||
log.debug('Got %8.1f kB, realtime: %6.2f%%, drift: %+5.2f ppm',
|
||||
self.stats['rx_bits'] / 8e3,
|
||||
duration * 100.0 / (i*config.Tsym),
|
||||
(1.0 - sampler.freq) * 1e6)
|
||||
log.debug(
|
||||
'Got %8.1f kB, realtime: %6.2f%%, drift: %+5.2f ppm',
|
||||
self.stats['rx_bits'] / 8e3,
|
||||
duration * 100.0 / (i*config.Tsym),
|
||||
(1.0 - sampler.freq) * 1e6
|
||||
)
|
||||
|
||||
def start(self, signal, freqs, gain=1.0):
|
||||
sampler = sampling.Sampler(signal, sampling.Interpolator())
|
||||
|
||||
@@ -48,9 +48,10 @@ def FileType(mode, process=None):
|
||||
|
||||
|
||||
def main():
|
||||
description = ('Audio OFDM MODEM: {:.1f} kb/s ({:d}-QAM x {:d} carriers) '
|
||||
'Fs={:.1f} kHz').format(modem.modem_bps / 1e3,
|
||||
len(config.symbols), config.Nfreq, config.Fs / 1e3)
|
||||
fmt = ('Audio OFDM MODEM: {:.1f} kb/s ({:d}-QAM x {:d} carriers) '
|
||||
'Fs={:.1f} kHz')
|
||||
description = fmt.format(modem.modem_bps / 1e3, len(config.symbols),
|
||||
config.Nfreq, config.Fs / 1e3)
|
||||
p = argparse.ArgumentParser(description=description)
|
||||
g = p.add_mutually_exclusive_group()
|
||||
g.add_argument('-v', '--verbose', default=0, action='count')
|
||||
@@ -112,7 +113,8 @@ def main():
|
||||
elif args.verbose == 1:
|
||||
level, format = 'DEBUG', '%(message)s'
|
||||
elif args.verbose >= 2:
|
||||
level, format = ('DEBUG', '%(asctime)s %(levelname)-10s %(message)-100s '
|
||||
level, format = ('DEBUG', '%(asctime)s %(levelname)-10s '
|
||||
'%(message)-100s '
|
||||
'%(filename)s:%(lineno)d')
|
||||
if args.quiet:
|
||||
level, format = 'WARNING', '%(message)s'
|
||||
|
||||
Reference in New Issue
Block a user