From 53b7455e2e35fc7d902a20bb5bb9955cee893b1a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:49:00 -0400 Subject: [PATCH] Update pacsat.sh with tests for sound card, txc, and rtl --- groundstation/pacsat.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9aac313a..61ece654 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -28,6 +28,32 @@ else fi +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 +else + echo "No USB Sound Card detected" + soundcard=0 +fi + +gpio -g mode 7 up +if [[ $(gpio -g read 7 | grep 0) ]] ; then + echo "TXC is present" + txc=1 +else + echo "TXC not present" + txc=0 +fi + +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 + FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then