Merge pull request #93 from alanbjohnston/master-arg
Simplfied sysytemd and mode handling considerablypull/101/head
commit
846ba7051a
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo -e "\nDemo of CubeSatSim at 434.9 MHz\n"
|
|
||||||
|
|
||||||
sudo systemctl restart rpitx
|
|
||||||
|
|
||||||
if [ "$1" = "c" ]; then
|
|
||||||
echo "Mode cycling"
|
|
||||||
y=$(last reboot | grep ^reboot | wc -l)
|
|
||||||
echo $y
|
|
||||||
echo $(($y % 4))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ("$1" = "a" ) || (("$1" = "c") && ("$(($y %4))" = 3)) ]]; then
|
|
||||||
echo "Mode is continuous AFSK"
|
|
||||||
/home/pi/CubeSatSim/cubesatsim afsk
|
|
||||||
elif [[ ("$1" = "b" ) || (("$1" = "c") && ("$(($y %4))" = 1)) ]]; then
|
|
||||||
echo "Mode is continuous BPSK"
|
|
||||||
sudo cpulimit -l 2.5 -b -P cubesatsim
|
|
||||||
/home/pi/CubeSatSim/cubesatsim bpsk
|
|
||||||
elif [[ ("$1" = "s" ) || (("$1" = "c") && ("$(($y %4))" = 2)) ]]; then
|
|
||||||
echo "Mode is continuous SSTV"
|
|
||||||
while true; do sleep 5; done
|
|
||||||
else
|
|
||||||
echo "Mode is continuous FSK"
|
|
||||||
/home/pi/CubeSatSim/cubesatsim fsk
|
|
||||||
fi
|
|
||||||
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo -e "\nrpitx for CubeSatSim at 434.9 MHz using python\n"
|
|
||||||
|
|
||||||
if [ "$1" = "c" ]; then
|
|
||||||
echo "Mode cycling"
|
|
||||||
y=$(last reboot | grep ^reboot | wc -l)
|
|
||||||
echo $y
|
|
||||||
if [ $(($y % 4)) = 3 ]; then
|
|
||||||
echo "Mode is continuous AFSK"
|
|
||||||
python3 -u /home/pi/CubeSatSim/rpitx.py a
|
|
||||||
elif [ $(($y % 4)) = 1 ]; then
|
|
||||||
echo "Mode is continuous BPSK"
|
|
||||||
python3 -u /home/pi/CubeSatSim/rpitx.py b
|
|
||||||
elif [ $(($y % 4)) = 2 ]; then
|
|
||||||
echo "Mode is continuous SSTV"
|
|
||||||
python3 -u /home/pi/CubeSatSim/rpitx.py s
|
|
||||||
else
|
|
||||||
echo "Mode is continuous FSK"
|
|
||||||
python3 -u /home/pi/CubeSatSim/rpitx.py f
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
python3 -u /home/pi/CubeSatSim/rpitx.py $1
|
|
||||||
fi
|
|
||||||
|
|
||||||
Loading…
Reference in new issue