From 2c76ee5db935cea7779c0bf51d9b80d998f576c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Jun 2025 14:34:42 -0400 Subject: [PATCH] Update fctelem.sh add FCD check and gain set --- groundstation/fctelem.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index bfcbb5ff..485a08c9 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -50,6 +50,17 @@ sudo killall -9 python3 &>/dev/null #sudo systemctl stop openwebrx + +if [[ $(/home/pi/fcdctl/fcdctl -l | grep "No FCD found") ]]; then + echo "No FunCube Dongle Found!" + echo "Plug in FCD and try running again" + sleep 30 + exit +else + echo "FCD Found! Setting Gain" + /home/pi/fcdctl/fcdctl -g 0 -m 1 -i 0 +fi + # FILE=/home/pi/CubeSatSim/groundstation/public_html FILE=/home/pi/CubeSatSim/fctelem/public_html if [ ! -d "$FILE" ]; then