From a64c34c41a5f7179550a4d3543c73d71cdb0eb52 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:39:28 -0500 Subject: [PATCH] Update config Pacsat mode "p" in .mode --- config | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config b/config index e4c41243..ea596d16 100755 --- a/config +++ b/config @@ -1416,11 +1416,22 @@ elif [ "$1" = "-g" ]; then elif [ "$1" = "-G" ]; then echo "Changing to Pacsat mode" - echo - sudo systemctl stop cubesatsim - sudo systemctl stop transmit + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value - /home/pi/CubeSatSim/pacsat.sh + echo "changing CubeSatSim to Pacsat mode" + sudo echo "p" > /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 + else + restart=1 + fi elif [ "$1" = "-h" ]; then