Update pacsat.sh check callsign and update if changed

pacsat-v2.2-tlm3
Alan Johnston 4 weeks ago committed by GitHub
parent 22e9fd4209
commit 20a9466e54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,7 +2,14 @@
# script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station
if [ ! -d "/home/pi/PacSatGround" ]; then
loopback=0
if [ "$1" = "l" ] ; then
loopback=1
fi
if [ ! -d "/home/pi/PacSatGround" ] ; then
mkdir /home/pi/PacSatGround
@ -13,6 +20,20 @@ if [ ! -d "/home/pi/PacSatGround" ]; then
fi
value=`cat /home/pi/CubeSatSim/sim.cfg`
echo "$value" > /dev/null
set -- $value
callsign="$1"
oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties)
if [ ! "$callsign" = "$oldcallsign" ]
sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties
fi
sudo modprobe snd-aloop
#sudo systemctl stop cubesatsim >/dev/null 2>&1
@ -90,15 +111,17 @@ echo
sudo usermod -a -G gpio pi
if [ ! "$1" = "l" ]; then
if [ "$loopback" = "1" ]; then
#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh"
echo "Using TXC FM transceiver"
/home/pi/CubeSatSim/groundstation/pacsat-df.sh &
else
echo "Using audio loopback"
echo "Using Audio Loopback"
/home/pi/CubeSatSim/groundstation/pacsat-d.sh &
else
echo "Using TXC FM Transceiver"
/home/pi/CubeSatSim/groundstation/pacsat-df.sh &
fi
# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 &

Loading…
Cancel
Save

Powered by TurnKey Linux.