Merge pull request #429 from alanbjohnston/fiabv4-auto-tune-p

Latest fixes from FIABv4
master-b
Alan Johnston 3 days ago committed by GitHub
commit 9935ceac33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -95,9 +95,10 @@ function check_restart {
echo "$value" > /dev/null
set -- $value
if [ "$1" = "p" ] || [ "$1" = "P" ] ; then
reboot=1
elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then
# if [ "$1" = "p" ] || [ "$1" = "P" ] ; then
# reboot=1
#el
if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then
FILE=/home/pi/CubeSatSim/battery_saver
if [ -f "$FILE" ]; then
restart=1
@ -1833,7 +1834,8 @@ elif [ "$1" = "-I" ]; then
# echo "changing CubeSatSim to Pacsat mode"
reboot=1
# reboot=1
check_restart
sudo echo "P" > /home/pi/CubeSatSim/.mode
value=`cat /home/pi/CubeSatSim/sim.cfg`
@ -1872,7 +1874,8 @@ elif [ "$1" = "-k" ]; then
echo
sudo systemctl stop pacsatsim &>/dev/null
sudo rm -r /home/pi/PacSat
reboot=1
# reboot=1
sudo systemctl restart pacsatsim
elif [ "$1" = "-h" ]; then

@ -0,0 +1,41 @@
#!/bin/bash
# script to send APRS or DTMR commands to a CubeSatSim
value=`cat /home/pi/CubeSatSim/.mode`
echo "$value" > /dev/null
set -- $value
if [ "$1" != "n" ]; then
echo "You are not in Transmit Commands mode"
sleep 10
exit
fi
sudo killall -9 zenity &>/dev/null
echo
autotune=0
mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=360 --title="Transmit Command" --text="Choose the command to transmit" --column="Mode" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off")
# echo $mode
if [ -z "$mode" ]; then
echo "No choice made."
sleep 10
exit
fi
/home/pi/CubeSatSim/config -$mode
sleep 10

@ -5,6 +5,12 @@ echo "Startup script to run FoxTelem for FIAB v4"
echo
value=`cat /home/pi/CubeSatSim/.mode`
echo "$value" > /dev/null
set -- $value
echo $1
if [ "$1" != "P" ] ; then
sudo killall -9 FoxTelem &>/dev/null
FILE=/home/pi/FoxTelemetryData/.foxprofile
@ -36,4 +42,10 @@ sleep 10
fi
else
echo "Don't run FoxTelem since PacSat Ground Station mode is set"
# /home/pi/CubeSatSim/groundstation/pacsat-run.sh
fi
#$SHELL

@ -71,29 +71,15 @@ set -- $value
MODE=$1
if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then
echo
echo "Changing to PacSat Ground Station Mode."
echo "You might reboot"
echo
sleep 5
/home/pi/CubeSatSim/config -I
fi
echo
echo "Mode is not PacSat Ground Station"
echo
echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?"
read -r ANS
if [ "$ANS" = "y" ]; then
/home/pi/CubeSatSim/config -I
exit
else
echo
echo "You can run the PacSat Ground Station after you change mode and reboot."
sleep 10
exit
fi
elif [ "$loopback" = "1" ] ; then
if [ "$loopback" = "1" ] ; then
# if [ ! "$MODE" = "p" ] ; then
echo
@ -107,7 +93,8 @@ elif [ "$loopback" = "1" ] ; then
cd
sudo rm PacSatGroundLoop.zip &>/dev/null
wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip
# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip
cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip .
unzip PacSatGround.zip -d PacSatGroundLoop
sudo rm PacSatGround.zip
@ -141,7 +128,8 @@ else
cd
sudo rm PacSatGround.zip &>/dev/null
wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip
# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip
cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip .
unzip PacSatGround.zip
sudo rm PacSatGround.zip
@ -302,7 +290,7 @@ echo
cat $DIREWOLF_CONF
echo
direwolf -r 48000 -c $DIREWOLF_CONF -t 0 &
direwolf -qd -r 48000 -c $DIREWOLF_CONF &
cd /home/pi/Desktop/PacsatGround/

@ -516,8 +516,8 @@ FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled
if [ ! -f "$FILE" ]; then
cd
#git clone https://github.com/alanbjohnston/pi_pacsat.git
git clone https://github.com/ac2cz/pi_pacsat.git
git clone https://github.com/alanbjohnston/pi_pacsat.git
#git clone https://github.com/ac2cz/pi_pacsat.git
cd pi_pacsat
#git checkout master-debug
cd Debug

@ -87,7 +87,8 @@ if [ ! -d "/home/pi/PacSat" ]; then
mkdir /home/pi/PacSat
mkdir /home/pi/PacSat/pacsat
mkdir /home/pi/PacSat/pacsat/dir
wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip
# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip
cp /home/pi/pi_pacsat/zip/pacsat-dir.zip .
unzip pacsat-dir.zip
sudo rm pacsat-dir.zip
@ -96,7 +97,8 @@ if [ ! -d "/home/pi/PacSat" ]; then
sudo rm /home/pi/pi_pacsat/Debug/pacsat.state
sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat
sudo rm pi_pacsat.zip
wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip
# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip
cp /home/pi/pi_pacsat/zip/pi_pacsat.zip .
unzip pi_pacsat.zip -d /
sudo rm pi_pacsat.zip
@ -296,7 +298,8 @@ echo
cat $DIREWOLF_CONF
echo
direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 &
#direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 &
direwolf -qd -r 48000 -c $DIREWOLF_CONF &
# 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 434900 &
## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 &

Loading…
Cancel
Save

Powered by TurnKey Linux.