Update config for PL RX and TX

beta-pl
Alan Johnston 2 years ago committed by GitHub
parent 97fcf7c3d9
commit c4c916616e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

119
config

@ -68,6 +68,13 @@ if [ "$1" = "" ]; then
fi
echo
echo -n "RX PL code is: "
echo $10
echo
echo -n "TX PL code is: "
echo $11
echo
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
echo "Safe Mode! Battery saver mode is ON"
@ -79,7 +86,7 @@ if [ "$1" = "" ]; then
echo -e "Current sim.cfg configuration file:"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo
echo "To change, include an OPTION"
@ -185,7 +192,7 @@ elif [ "$1" = "-t" ]; then
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo "Do you want Simulated Telemetry ON (y/n) "
read sim
@ -202,8 +209,8 @@ elif [ "$1" = "-t" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $sim $6 $7 $8 $9
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 $10 $11
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
echo
echo "Rebooting CubeSatSim with new configuration file"
echo
@ -229,7 +236,7 @@ elif [ "$1" = "-c" ]; then
echo $1
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo "Enter callsign in all capitals: "
read callsign
@ -243,8 +250,8 @@ elif [ "$1" = "-c" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 > /home/pi/CubeSatSim/sim.cfg
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
fi
if [ "$norestart" = "1" ]; then
@ -276,7 +283,7 @@ elif [ "$1" = "-r" ]; then
echo $2
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo -e "Enter Reset Count (integer): "
@ -296,8 +303,8 @@ elif [ "$1" = "-r" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $resets $3 $4 $5 $6 $7 $8 $9
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 > /home/pi/CubeSatSim/sim.cfg
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 $10 $11
echo $1 $resets $3 $4 $5 $6 $7 $8 $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
fi
if [ "$norestart" = "1" ]; then
@ -330,7 +337,7 @@ elif [ "$1" = "-l" ]; then
echo $3
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo -e "Enter latitude (decimal degrees, positive is north): "
@ -372,8 +379,8 @@ elif [ "$1" = "-l" ]; then
fi
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $2 $lat $long $5 $6 $7 $8 $9
echo $1 $2 $lat $long $5 $6 $7 $8 $9 > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $lat $long $5 $6 $7 $8 $9 $10 $11
echo $1 $2 $lat $long $5 $6 $7 $8 $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
if [ "$norestart" = "1" ]; then
echo
@ -548,7 +555,7 @@ elif [ "$1" = "-q" ]; then
echo $6
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo -e "Enter squelch (integer 0 - 8): "
@ -570,8 +577,75 @@ elif [ "$1" = "-q" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $sq $7 $8 $9
echo $1 $2 $3 $4 $4 $sq $7 $8 $9 > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $sq $7 $8 $9 $10 $11
echo $1 $2 $3 $4 $4 $sq $7 $8 $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
echo
echo "Rebooting CubeSatSim with new configuration file"
echo
sudo reboot now
# sudo systemctl restart cubesatsim
elif [ "$1" = "-P" ]; then
echo
echo "Editing the PL (Private Line) CTCSS/CDCSS setting in"
echo "the configuration file for CubeSatSim"
echo
value=`cat /home/pi/CubeSatSim/sim.cfg`
echo "$value" > /dev/null
set -- $value
echo
echo "Current value of RX PL is"
echo $10
echo "Current value of TX PL is"
echo $11
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo -e "Enter RX PL value integer 0: None, 01-38 CTCSS analog, 39-121CDCSS digital"
read rxpl
if [ -z $rxpl ] ; then
rxpl="$10"
echo "Keeping value of" $rxpl
fi
if ! [[ $rxpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then
echo "Error: not a number!"
rxpl="$10"
echo "Keeping value of" $rxpl
fi
echo -e "Enter TX PL value integer 0: None, 01-38 CTCSS analog, 39-121CDCSS digital"
read txpl
if [ -z $txpl ] ; then
txpl="$11"
echo "Keeping value of" $txpl
fi
if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then
echo "Error: not a number!"
txpl="$11"
echo "Keeping value of" $txpl
fi
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl > /home/pi/CubeSatSim/sim.cfg
echo
echo "Rebooting CubeSatSim with new configuration file"
echo
@ -600,7 +674,7 @@ elif [ "$1" = "-F" ]; then
echo $8
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo "Enter tx frequency as 4XX.XXXX: "
read tx
@ -623,8 +697,8 @@ elif [ "$1" = "-F" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
echo $1 $2 $3 $4 $5 $6 $tx $rx $9
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 $10 $11
echo $1 $2 $3 $4 $5 $6 $tx $rx $9 $10 $11 > /home/pi/CubeSatSim/sim.cfg
# fi
# if [ "$norestart" = "1" ]; then
@ -655,7 +729,7 @@ elif [ "$1" = "-H" ]; then
echo
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9
# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
echo "Do you want Balloon mode ON (y/n) "
read hab
@ -672,8 +746,8 @@ elif [ "$1" = "-H" ]; then
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab > /home/pi/CubeSatSim/sim.cfg
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab $10 $11
echo $1 $2 $3 $4 $5 $6 $7 $8 $hab $10 $11 > /home/pi/CubeSatSim/sim.cfg
echo
echo "Rebooting CubeSatSim with new configuration file"
echo
@ -722,6 +796,7 @@ elif [ "$1" = "-h" ]; then
echo " -H Chnage the Balloon mode"
echo " -p Display payload sensor data"
echo " -v Display voltage and current data"
echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX"
echo
exit

Loading…
Cancel
Save

Powered by TurnKey Linux.