remove hardcoded data files

This commit is contained in:
Roman Zeyde
2014-07-16 20:35:57 +03:00
parent b261f1b102
commit 30b377810a
3 changed files with 6 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ import numpy as np
import logging
import itertools
import time
import sys
import os
log = logging.getLogger(__name__)
@@ -194,8 +195,7 @@ def main(fname):
return
log.info('Decoded %.3f kB', len(data) / 1e3)
with file('data.recv', 'wb') as f:
f.write(data)
sys.stdout.write(data)
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO,

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python
import numpy as np
import sys
import logging
import itertools
@@ -17,8 +17,7 @@ class Symbol(object):
carrier = [np.exp(2j * np.pi * F * t) for F in frequencies]
sym = Symbol()
data = open('data.send', 'r').read()
data = sys.stdin.read()
def write(fd, sym, n=1):

View File

@@ -3,7 +3,7 @@ set -u
set -e
dd if=/dev/urandom of=data.send bs=1024 count=16 status=none
./send.py tx.int16
./send.py tx.int16 < data.send
killall arecord aplay || true
@@ -13,7 +13,7 @@ sleep 1
killall arecord aplay || true
./recv.py rx.int16
./recv.py rx.int16 > data.recv
./errors.py data.*
if [ -z $? ]; then
./show.py tx.int16 rx.int16