-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmulti_tx.py
More file actions
35 lines (27 loc) · 774 Bytes
/
multi_tx.py
File metadata and controls
35 lines (27 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from time import sleep
band_change = False
modes = ['WSPR', 'DFCW6', 'JT65']
def TXEnd():
global band_change
band_change = True
# Register callback for TX End
self.register('tx_end', TXEnd)
self.async_alert("Script begin - Ctrl-C to terminate")
try:
app('set buffer 1')
app('set rnd_tx true')
app('tx enable')
while True:
for mode in modes:
app('set mode {}'.format(mode))
for band in self.available_bands:
app('set band {}'.format(band))
while band_change == False:
sleep(0.001)
band_change = False
except:
app('tx cancel')
app('tx disable')
self.async_alert("Script termniation")
app('tx disable')
self.async_alert("Script end")