-
Notifications
You must be signed in to change notification settings - Fork 0
/
ptt.sh
executable file
·23 lines (21 loc) · 928 Bytes
/
ptt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#F2A Morse sender for GB2CW
# (c) Michael Topple GM5AUG
#!/bin/bash
DISPLAY=:0 #Overcomes an issue with not being able to access the soundcard on rig
echo Filename?
read varname # asks user to choose file to send
echo Speed?
read speed # asks user to choose speed to send (coupled with Farnsworth speed)
FILE=$varname
#if [[ -f foo ]]; then echo file exists; else echo file not found; fi
if test -f "$FILE"; then
echo "$FILE exists." # if the file exists
else
echo "$FILE does not exist." # if it doesn't
fi
xmlrpc localhost:54321 rig.set_mode FM-D # accesses the rig through Flrig and sets mode to FM-D (to receive soundcard audio)
xmlrpc localhost:54321 rig.set_ptt i/1 # keys rig's PTT
morse -w $speed -F 13 -a < $varname # runs morse app with chosen variables
xmlrpc localhost:54321 rig.set_ptt i/0 # unkeys rig's PTT
xmlrpc localhost:54321 rig.set_mode FM # returns rig to FM