Update pacsat-config.sh add main and simulated

pacsat-v2.2-tlm3
Alan Johnston 4 weeks ago committed by GitHub
parent 4025dca6c1
commit 8d672cccb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,24 +19,43 @@ sudo killall -9 direwolf &>/dev/null
# profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") # profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat")
# echo $profile # echo $profile
echo "Here are the PacSat Ground Station configuration choices:" echo "Here are the PacSat configuration choices:"
echo echo
echo "1. Set PacSat Ground Station Callsign" echo "1. PacSat Ground Station Configuration"
echo echo
echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo "2. PacSat Ground Station Loopback Configuration"
echo echo
echo "3. Set Frequencies" echo "3. Set Frequencies"
echo echo
echo "4. Reset PacSat Ground Station Configuration" echo "4. Reset PacSat Satellite"
echo
echo "Which do you choose? Enter 1 - 4"
read -r ANS
if [ -z "$ANS" ]; then
echo "No choice made. Exiting."
sleep 3
exit
fi
if [ "$ANS" = "1" ] ; then
echo "Here are your PacSat Ground Station Configuration choices:"
echo echo
echo "5. Reset PacSat Ground Station Loopback Configuration" echo "1. PacSat Ground Station Callsign"
echo echo
echo "6. Reset PacSat Satellite" echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration"
echo echo
echo "Which do you choose? Enter 1 - 5" echo "3. Reset PacSat Ground Station Configuration"
read -r ANS read -r ANS
if [ -z "$ANS" ]; then if [ -z "$ANS" ]; then
echo "No choice made. Exiting." echo "No choice made. Exiting."
@ -49,10 +68,31 @@ sudo killall -9 direwolf &>/dev/null
if [ "$ANS" = "1" ] ; then if [ "$ANS" = "1" ] ; then
echo "You have chosen to set the PacSat Ground Station Callsign" oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties)
echo
/home/pi/CubeSatSim/config -c n echo "Callsign in PacSatGround.properties is "
echo $oldcallsign
echo "Enter new callsign in all capitals: "
read callsign
if [ -z $callsign ] ; then
callsign="$1"
echo "Keeping value of" $oldcallsign
else
echo "Configured callsign is "
echo $callsign
if [ ! "$callsign" = "$oldcallsign" ] ; then
sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties
cat /home/pi/PacSatGround/PacSatGround.properties
fi
elif [ "$ANS" = "2" ] ; then elif [ "$ANS" = "2" ] ; then
@ -84,16 +124,8 @@ sudo killall -9 direwolf &>/dev/null
echo echo
fi fi
elif [ "$ANS" = "3" ] ; then elif [ "$ANS" = "3" ] ; then
echo "You have chosen to set the Frequency of the PacSat Ground Station"
echo
/home/pi/CubeSatSim/config -F n
elif [ "$ANS" = "4" ] ; then
echo "You have chosen to reset the PacSat Ground Station Configuration" echo "You have chosen to reset the PacSat Ground Station Configuration"
echo echo
echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft"
@ -101,16 +133,26 @@ sudo killall -9 direwolf &>/dev/null
sudo rm -r /home/pi/PacSatGround sudo rm -r /home/pi/PacSatGround
elif [ "$ANS" = "5" ] ; then elif [ "$ANS" = "2" ] ; then
echo "You have chosen to reset the PacSat Ground Station Loopback Configuration" echo "Here are your PacSat Ground Station Loopback Configuration choices:"
echo echo
echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo "1. PacSat Ground Station Callsign"
echo
echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration"
echo
echo "3. Reset PacSat Ground Station Configuration"
read -r ANS
elif [ "$ANS" = "3" ] ; then
echo "You have chosen to set the Frequency of the PacSat Ground Station"
echo echo
sudo rm -r /home/pi/PacSatGroundLoop /home/pi/CubeSatSim/config -F n
elif [ "$ANS" = "6" ] ; then elif [ "$ANS" = "4" ] ; then
echo "You have chosen to reset the PacSat Satellite" echo "You have chosen to reset the PacSat Satellite"
echo echo
@ -119,7 +161,7 @@ sudo killall -9 direwolf &>/dev/null
else else
echo "Please enter only 1 to 5" echo "Please enter only 1 to 4"
fi fi

Loading…
Cancel
Save

Powered by TurnKey Linux.