-
Notifications
You must be signed in to change notification settings - Fork 0
/
start
executable file
·366 lines (299 loc) · 7.8 KB
/
start
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
#! /usr/bin/tcsh
############################################################################################
# Start - J.B.Attili - 2018
# Script showing how to start the keyer for various contests and practice.
############################################################################################
cls
# Primary rig
set RIG="NONE"
#set RIG="HAMLIB"
#set RIG="DIRECT"
#set RIG="ANY"
set RIG_TYPE=""
set RIG_TYPE="FTdx3000"
#set RIG_TYPE="FT991a"
#set RIG_TYPE="IC9700"
# Secondary rig for SO2R
set RIG2="NONE"
#set RIG2="DIRECT"
#set RIG_TYPE2="FT991a"
#set RIG_TYPE2="IC9700"
set FIND_RIG="~/Python/findRig/findRig.py"
set PRACTICE=""
set PRACTICE="-prac -nrows 0"
#set PRACTICE="-prac -nrows 0 -lock"
set NANO=""
set NANO="-keyer ANY"
#set NANO="-keyer NONE"
#set NANO="-nano"
#set NANO="-nano -echo"
#set NANO="-k3ng -echo"
#set NANO="-winkeyer -echo"
#set NANO="-sidetone"
#set NANO="-nano -sidetone"
set KILL_OLD = 0
set WPM=25
set HINTS=""
#set HINTS="-hints"
set CA_ONLY=""
set CA_ONLY="-ca_only"
set SCP=""
set SCP="-scp"
set AGGRESSIVE=""
set AGGRESSIVE="-aggressive"
set CONTEST="paddling"
#set CONTEST="cwt"
#set CONTEST="foc"
#set CONTEST="sst"
#set CONTEST="mst"
#set CONTEST="sprint"
#set CONTEST="naqp"
#set CONTEST="cq160m"
#set CONTEST="arrl_dx"
#set CONTEST="iaru"
#set CONTEST="fd"
#set CONTEST="vhf"
#set CONTEST="cqvhf"
#set CONTEST="stew"
#set CONTEST="sat"
#set CONTEST="cqp"
#set CONTEST="wpx"
set CONTEST="ss"
#set CONTEST="cqww"
#set CONTEST="cwopen"
#set CONTEST="ten"
#set CONTEST="arrl_160m"
#set CONTEST="arrl_10m"
#set CONTEST="rac"
#set CONTEST="state"
#set CONTEST="default"
#set CONTEST="ragchew"
#set CONTEST="dx"
#set CONTEST="skcc"
#set CONTEST="calls"
#set CAPTURE="-capture -sidetone"
#set CAPTURE="-capture"
#set CAPTURE=""
#set STATE="CP"
########################################################################
# Determine current workspace number - we'll use this later to
# keep windows on this workspace instead of wandering
echo " "
set WS=`wmctrl -d | fgrep " * " | cut -f 1 -d ' '`
echo Current Workspace = $WS
echo " "
# Settings for sending practice
if( ($CONTEST == "paddling") && ($RIG != "NONE") )then
pkill flrig
set RIG9=`$FIND_RIG`
echo $RIG9
if( $RIG9 == "None" )then
set RIG="NONE"
endif
echo $RIG9 $RIG
#exit
else if( ($CONTEST == "paddling") && ($RIG == "NONE9") )then
#pkill flrig
set RIG9=`$FIND_RIG`
if( $RIG9 != "None" )then
set RIG="DIRECT"
set RIG_TYPE=$RIG9
endif
echo $RIG9 $RIG
#exit
endif
if( $CONTEST == "paddling" )then
if( $RIG != "NONE" )then
set CMD="$FIND_RIG -BREAK 0"
echo $CMD
$CMD
endif
set WPM=20
set CONTEST="ragchew"
set HINTS="-adjust -sending -immediate"
#exit
########################################################################
# Settings for NAQP contest
else if( $CONTEST == "naqp" )then
set WPM=30
set HINTS="-adjust"
#set HINTS="-adjust -autofill -scp"
# Settings for CW Ops mini tests
else if( $CONTEST == "cwt" )then
set WPM=30
set HINTS="-adjust"
#set HINTS=""
# Settings for FOC BW
else if( $CONTEST == "foc" )then
set WPM=30
set HINTS="-adjust"
# Settings for NCCC Sprints
else if( $CONTEST == "sprint" )then
set WPM=25
#set HINTS="-adjust"
set HINTS=""
set SCP=""
# Settings for K1USN slow speed tests
else if( $CONTEST == "sst" )then
set WPM=20
set HINTS="-adjust"
#set HINTS="-adjust -autofill"
#set HINTS="-use_log_hist -autofill -nrows 1"
# Settings for ICWC Medium speed tests
else if( $CONTEST == "mst" )then
set WPM=25
set HINTS="-adjust"
# Settings for NCCC CW Sprints
else if( $CONTEST == "sprint" )then
set WPM=25
set CONTEST="-sprint"
set HINTS=""
# Settings for CW Ops cw open
else if( $CONTEST == "cwopen" )then
set WPM=30
set HINTS="-adjust"
# Setting for CQ WPX (or any contest that requires rst + serial number)
else if( $CONTEST == "wpx" )then
set WPM=30
set HINTS="-adjust"
# Setting for CQ World Wide
else if( $CONTEST == "cqww" )then
set WPM=25
set HINTS="-adjust"
# Settings for field day
else if( $CONTEST == "fd" )then
set WPM=25
set HINTS="-adjust"
# Settings for IARU HF Champs
else if( $CONTEST == "iaru" )then
set WPM=30
set HINTS=" -adjust"
# Settings for CA QSO Party
else if( $CONTEST == "cqp" )then
set WPM=30
set HINTS="-adjust $CA_ONLY"
# Settings for ARRL & CQ VHF
else if( $CONTEST == "vhf" || $CONTEST == "cqvhf" )then
set WPM=25
# Settings for Stew Perry - need to test this out
else if( $CONTEST == "vhf" )then
set WPM=25
# Settings for satellites
else if( $CONTEST == "sat" )then
set WPM=25
# Settings for ARRL 160m
else if( $CONTEST == "arrl_160m" )then
set WPM=25
set HINTS="-adjust"
# Settings for ARRL 10m
else if( $CONTEST == "arrl_10m" )then
set WPM=25
set HINTS="-adjust"
# Settings for CQ 160m
else if( $CONTEST == "cq160m" )then
set WPM=25
set HINTS="-adjust"
# Settings for 10-10 10m
else if( $CONTEST == "ten" )then
set WPM=25
set HINTS=""
# Settings for ARRL Intl DX - need to test this more, not sure it handles dx stations correctly
else if( $CONTEST == "arrl_dx" )then
set WPM=30
set HINTS=""
# Settings for ARRL Sweepstakes
else if( $CONTEST == "ss" )then
set WPM=30
set HINTS=""
set HINTS="-adjust"
# Settings for SKCC practice
else if( $CONTEST == "skcc" )then
set WPM=25
set HINTS="-adjust"
# Settings for random calls practice
else if( $CONTEST == "calls" )then
set WPM=25
set HINTS="-adjust"
# Settings for Default Quick, Ragchew or QSOs
else if( $CONTEST == "default" || $CONTEST == "ragchew" || $CONTEST == "dx" )then
set WPM=22
set HINTS="-use_log_hist -autofill -nrows 0 -lock -sending"
# Settings for various state QPs
else if( $CONTEST == "state" )then
set CONTEST="state $STATE"
set WPM=25
set HINTS=""
# RAC contest
else if( $CONTEST == "rac" )then
set WPM=25
set HINTS=""
else
echo START: Unknown Contest -$CONTEST-
exit
endif
########################################################################
# Clean-up
if( $KILL_OLD )then
pkill pyKeyer
pkill pyLogger
pkill flrig
pkill rigctl
pkill rigctld
endif
########################################################################
# Setup for Hamlib
if( $RIG != "HAMLIB" )then
echo No Hamlib
else if( $RIG_TYPE == "FTdx3000" )then
set DEVICE="/dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_AH046H3M120067-if00-port0"
set MODEL = 129
else if( $RIG_TYPE == "FT991a" )then
set DEVICE = "/dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_00A50791-if00-port0"
set MODEL = 135
else
echo " "
echo Error configuring HAMLIB - Unknown rig type $RIG_TYPE
echo " "
exit
endif
# Start hamlib
if( $RIG == "HAMLIB" )then
set a=`ls -l $DEVICE`
echo -$a-
set b=`echo $a | cut -f 2 -d '>'`
echo -$b-
set c=`echo $b | cut -f 3 -d '/'`
echo -$c-
set EXE_DIR="~/hamlib-3.3/tests"
$EXE_DIR/rigctld -m $MODEL -r /dev/$c >&/tmp/HAMLIB &
sleep 1
echo "Rigctl daemon started."
ps -A u | fgrep -i rigctl
#exit
endif
################################################################################
if( "X$PRACTICE" == "" )then
set CAPTURE="-capture"
else
set CAPTURE=""
endif
# Start keyer
pkill pyKeyer
set OPTS="-wpm ${WPM} $PRACTICE $NANO -${CONTEST} -rig $RIG $RIG_TYPE $HINTS $CAPTURE $SCP $AGGRESSIVE -desktop $WS"
if( $RIG2 != "NONE" )then
set OPTS="$OPTS -rig2 $RIG2 $RIG_TYPE2"
endif
echo " "
echo OPTS=$OPTS
echo " "
cd ~/Python/pyKeyer
set EXE="pyKeyer.py"
#cd dist
#set EXE="pyKeyer"
pwd
echo $EXE $OPTS
echo " " >& /tmp/KEYER
echo $EXE $OPTS >>& /tmp/KEYER
echo " " >& /tmp/KEYER
#$EXE $OPTS >>& /tmp/KEYER &
$EXE $OPTS