-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile_creator.py
22 lines (19 loc) · 859 Bytes
/
file_creator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QT_PlutoSDR
import time
channel_to_freq = {'channel1':2407000000, 'channel2':2412000000, 'channel3':2417000000, 'channel4':2422000000
,'channel5':2427000000, 'channel6':2432000000, 'channel7':2437000000, 'channel8':2442000000
,'channel9':2447000000, 'channel10':2452000000, 'channel11':2457000000, 'channel12':2462000000
,'channel13':24670000}
input_file_channel = 'channel1_bin.txt'
for i in range(1,14):
dict_index = 'channel' + str(i)
input_file_channel = input_file_channel.split("_")[0][:7] + str(i) + "_" + input_file_channel.split("_")[1]
flowgraph = QT_PlutoSDR.QT_PlutoSDR()
flowgraph.set_freq(channel_to_freq[dict_index])
flowgraph.set_filename(input_file_channel)
flowgraph.start()
time.sleep(0.05)
flowgraph.stop()
print("Frequency "+str(i)+" created")
print('exited')
exit()