diff --git a/.gitignore b/.gitignore index 31176c3b..ad3de7d0 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ logb.txt logo.txt logp.txt hotspot.ini +camera.jpg diff --git a/config b/config index 83c8f804..12223745 100755 --- a/config +++ b/config @@ -1665,6 +1665,8 @@ elif [ "$1" = "-g" ]; then sudo rm -r /home/pi/PacSatGroundLoop > /dev/null 2>&1 + sudo rm /home/pi/CubeSatSim/camera.jpg > /dev/null 2>&1 + if [ "$noreboot" = "0" ] ; then echo "Shutting down." sudo shutdown now diff --git a/pacsatsim.sh b/pacsatsim.sh index cf2aaf39..1d040d79 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -131,6 +131,8 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat/pacsat/dir mkdir /home/pi/PacSat/pacsat/txt cp /home/pi/CubeSatSim/Welcome_Message.txt /home/pi/PacSat/pacsat/txt/Welcome_Message.txt + mkdir /home/pi/PacSat/pacsat/img + cp /home/pi/CubeSatSim/sstv/sstv_image_tiny.jpg /home/pi/PacSat/pacsat/img/sstv_image_tiny.jpg cd /home/pi/pi_pacsat/Debug sudo rm pacsat_last_command_time.dat @@ -159,6 +161,20 @@ if [ ! -d "/home/pi/PacSat" ]; then # exit fi +if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 &>/dev/null +elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null +fi + +echo "Taking camera image and copying to pacsat img directory" +cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value diff --git a/sstv/sstv_image_tiny.jpg b/sstv/sstv_image_tiny.jpg new file mode 100644 index 00000000..41a0a642 Binary files /dev/null and b/sstv/sstv_image_tiny.jpg differ