-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun_lime
37 lines (30 loc) · 1.01 KB
/
run_lime
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
#
#!/bin/bash
#Create command pipe
if test -e /tmp/langstoneTRx ;then
rm /tmp/langstoneTRx
fi
mkfifo /tmp/langstoneTRx
#Test to see if the flowgraph is already running
if !(ps -ax |grep -v grep| grep -q Lang_TRX_Lime.py) then
sudo amixer -c1 cset numid=6 100% > /dev/null 2>&1
sudo amixer -c1 cset numid=8 50% > /dev/null 2>&1
sudo cp /home/pi/Langstone/splashload_Lime.bgra /dev/fb0
sudo raspi-gpio set 17,18 pu
#start up the GNU Radio flowgraph
python /home/pi/Langstone/Lang_TRX_Lime.py > /tmp/LangstoneTRX_Lime.log 2>&1 &
sleep 10
#check that the GNU module started corretly
if (ps -ax | grep -v grep| grep -q Lang_TRX_Lime.py)then
# If it did then start the GUI
/home/pi/Langstone/GUI_Lime > /tmp/LangstoneGUI_Lime.log 2>&1
else
# If not then display the error screen
sudo cp /home/pi/Langstone/gnufail_Lime.bgra /dev/fb0
sleep 5
fi
else
echo Langstone is already running. Use ./stop first.
sleep 5
fi
sudo cp /home/pi/Langstone/splash.bgra /dev/fb0