diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e61d3fc1..8a2c6696 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -11,21 +11,13 @@ card=0 pwm=0 if [ "$1" = "l" ] ; then - loopback=1 - elif [ "$1" = "v" ] ; then - vox=1 - elif [ "$1" = "c" ] ; then - card=1 - else - pwm=1 - fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then @@ -53,24 +45,19 @@ else echo "TXC not present" txc=0 - timeout 1 timeout 1 rtl_test &> out.txt - if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" - rtl=0 - else - echo "RTL-SDR detected." - rtl=1 - fi - - sudo killall -9 rtl_test &>/dev/null +if [[ $(lsusb | grep "RTL") ]] ; then + echo "RTL-SDR detected" + rtl=1 +else + echo "No RTL-SDR detected" + rtl=0 +fi fi FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then - safe=1 - fi value=`cat /home/pi/CubeSatSim/.mode` @@ -330,8 +317,6 @@ else fi -sudo killall -9 rtl_test &>/dev/null - sleep 10 #echo "Stopping Pacsatsim"