Update config resolve merge conflicts

pacsat-v2.2-tlm4
Alan Johnston 3 weeks ago committed by GitHub
parent 6b23a0b478
commit 7b0544ba23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

248
config

@ -2,114 +2,9 @@
function transmit_command {
<<<<<<< HEAD
FILE=/home/pi/CubeSatSim/transmit_dtmf
if [ -f "$FILE" ]; then
echo "Stopping command and control"
sudo systemctl stop command
echo "Transmit DTMF start"
# gpio write 28 0 # ptt
gpio write 2 1 # tx LED
timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-aprs.conf -t 0l
gpio write 2 0 # tx LED
# gpio write 28 1 #ptt
echo "Transmit stop"
echo "Resuming command and control"
sudo systemctl start command
else
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt
echo
echo -n "Sending APRS packet to change mode to APRS "
echo $STRING
sudo touch /home/pi/CubeSatSim/ready
sleep 3
fi
exit
}
function transmit_command_fsk {
FILE=/home/pi/CubeSatSim/transmit_dtmf
if [ -f "$FILE" ]; then
echo "Stopping command and control"
sudo systemctl stop command
echo "Transmit DTMF start"
gpio write 28 0 # ptt
gpio write 2 1 # tx LED
timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-fsk.conf -t 0l
gpio write 2 0 # tx LED
gpio write 28 1 #ptt
echo "Transmit stop"
echo "Resuming command and control"
sudo systemctl start command
else
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f"
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt
echo
echo -n "Sending APRS packet to change mode to FSK"
echo $STRING
sudo touch /home/pi/CubeSatSim/ready
sleep 3
fi
exit
}
function transmit_command_bpsk {
FILE=/home/pi/CubeSatSim/transmit_dtmf
if [ -f "$FILE" ]; then
echo "Stopping command and control"
sudo systemctl stop command
echo "Transmit DTMF start"
gpio write 28 0 # ptt
gpio write 2 1 # tx LED
timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-bpsk.conf -t 0l
gpio write 2 0 # tx LED
gpio write 28 1 #ptt
echo "Transmit stop"
echo "Resuming command and control"
sudo systemctl start command
else
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b"
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt
echo
echo -n "Sending APRS packet to change mode to BPSK"
echo $STRING
sudo touch /home/pi/CubeSatSim/ready
sleep 3
fi
exit
}
=======
MODE=$1
echo "CubeSatSim is in Transmit Commands mode"
echo
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
value=`cat /home/pi/CubeSatSim/sim.cfg`
echo "$value" > /dev/null
@ -148,6 +43,9 @@ function transmit_command_bpsk {
j)
number=7
;;
p)
number=8
;;
o)
number=10
;;
@ -197,7 +95,9 @@ function check_restart {
echo "$value" > /dev/null
set -- $value
if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then
if [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
restart=1
@ -212,12 +112,8 @@ function check_restart {
fi
}
<<<<<<< HEAD
echo "CubeSatSim v2.1 configuration tool"
=======
echo
echo "CubeSatSim v2.2 configuration tool"
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
echo
# echo $1
# echo $2
@ -459,25 +355,9 @@ elif [ "$1" = "-a" ]; then
else
echo "changing CubeSatSim to AFSK mode"
<<<<<<< HEAD
sudo echo "a" > /home/pi/CubeSatSim/.mode
if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
restart=1
else
reboot=1
fi
elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
else
restart=1
fi
=======
check_restart
sudo echo "a" > /home/pi/CubeSatSim/.mode
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
fi
elif [ "$1" = "-m" ]; then
@ -495,22 +375,7 @@ elif [ "$1" = "-m" ]; then
echo "changing CubeSatSim to CW mode"
check_restart
sudo echo "m" > /home/pi/CubeSatSim/.mode
<<<<<<< HEAD
if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
restart=1
else
reboot=1
fi
elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
else
restart=1
fi
=======
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
fi
elif [ "$1" = "-f" ]; then
@ -571,22 +436,6 @@ elif [ "$1" = "-s" ]; then
check_restart
sudo echo "s" > /home/pi/CubeSatSim/.mode
<<<<<<< HEAD
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
restart=1
else
reboot=1
fi
elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
else
restart=1
fi
=======
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
fi
elif [ "$1" = "-t" ]; then
echo
@ -668,23 +517,9 @@ elif [ "$1" = "-c" ]; then
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
<<<<<<< HEAD
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
# sudo systemctl stop pacsatsim &>/dev/null
# sudo killall -9 java &>/dev/null
# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config
# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config
# sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties
# sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties
# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties
# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties
=======
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13}
echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
fi
if [ "$norestart" = "1" ]; then
@ -1417,19 +1252,16 @@ elif [ "$1" = "-e" ]; then
if [ "$1" == "n" ]; then
<<<<<<< HEAD
if [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
else
=======
transmit_command "e"
else
echo "changing CubeSatSim to Repeater mode"
sudo echo "e" > /home/pi/CubeSatSim/.mode
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
restart=1
if [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
else
restart=1
fi
elif [ "$1" = "-n" ]; then
@ -1452,6 +1284,10 @@ elif [ "$1" = "-n" ]; then
echo "Switching to mode "$new
sudo echo $new > /home/pi/CubeSatSim/.mode
restart=1
elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then
echo "Switching to PacSat mode"
sudo echo $new > /home/pi/CubeSatSim/.mode
reboot=1
else
echo "Switching to BPSK mode"
sudo echo "b" > /home/pi/CubeSatSim/.mode
@ -1513,56 +1349,12 @@ elif [ "$1" = "-A" ]; then
while [ "$MODE" != "x" ];
do
echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode"
echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, p=PacSat, o=Beacon on/off x=Exit this mode"
read MODE
<<<<<<< HEAD
case $MODE in
1)
echo "Mode 1 is APRS"
transmit_command_aprs
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
;;
2)
echo "Mode 2 is FSK"
transmit_command_fsk
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f"
;;
3)
echo "Mode 3 is BPSK"
transmit_command_bpsk
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b"
;;
4)
echo "Mode 4 is SSTV"
transmit_command_sstv
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s"
;;
5)
echo "Mode 5 is CW"
transmit_command_cw
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m"
;;
*)
echo "Unknown mode"
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?"
;;
esac
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
# echo $STRING > /home/pi/CubeSatSim/t.txt
# echo
# echo -n "Sending APRS packet "
# echo $STRING
# sudo touch /home/pi/CubeSatSim/ready
# sleep 5
# sudo touch /home/pi/CubeSatSim/ready
=======
if [ "$MODE" != "x" ]; then
transmit_command $MODE
fi
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
echo
@ -2076,17 +1868,13 @@ elif [ "$1" = "-h" ]; then
echo " -D Change Transmit Commands state APRS or DTMF"
echo " -o Change telemetry beacon transmit state"
echo " -L Change microphone level for command and control"
<<<<<<< HEAD
echo " -g Reset configuration back to default settings and shutdown"
echo " -k Reset the PacSatSim Configuration"
=======
echo " -g Reset configuration back to default settings"
echo " -M Set simulated failure mode"
echo " -U Change the random failure mode setting"
echo " -N Set next mode or failure"
echo " -u Change gpsd state"
>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2
echo " -k Reset the PacSatSim Configuration"
echo
exit

Loading…
Cancel
Save

Powered by TurnKey Linux.