summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-04-12 13:13:18 +0300
committerYuval Adam <_@yuv.al>2018-04-12 13:13:18 +0300
commit85b9d43dda8404f2a13be60e04e1edb6618a09a9 (patch)
tree446cd2fd2edc8a3752a19c744414146e106e0479
parent476dd7446c84d39c47f10773571babc70916dd79 (diff)
Cleanup
-rw-r--r--async_fm_demod.py (renamed from fm.py)12
-rw-r--r--asynciotest.py8
2 files changed, 1 insertions, 19 deletions
diff --git a/fm.py b/async_fm_demod.py
index dc8df68..4c291cd 100644
--- a/fm.py
+++ b/async_fm_demod.py
@@ -1,24 +1,14 @@
import asyncio
from rtlsdr import RtlSdr
-RATE_IN = RATE_OUT = 170000
-RATE_OUT2 = 32000
-CUSTOM_ATAN = 1
-DEEMPH = 1
-SQUELCH = 0
-
async def streaming():
sdr = RtlSdr()
async for samples in sdr.stream():
- # do something with samples
- # ...
- print(len(samples), samples[0])
+ print(len(samples), samples[0], type(samples[0]))
- # to stop streaming:
await sdr.stop()
- # done
sdr.close()
loop = asyncio.get_event_loop()
diff --git a/asynciotest.py b/asynciotest.py
deleted file mode 100644
index f588a22..0000000
--- a/asynciotest.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import asyncio
-
-async def echo():
- pass
-
-if __name__ == '__main__':
- loop = asyncio.get_event_loop()
- loop.run_forever(echo())