From d055a87fbe6f2b54625079435f566cc7c2ad39f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 15 Sep 2026 16:30:10 -0400 Subject: [PATCH] Update pacsatsim.sh take one photo at start and copy to pacsat txt dir --- pacsatsim.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index cf2aaf39..d18069b3 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -159,6 +159,21 @@ 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 32 -h 25 &>/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 32 --height 25 &>/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 32 --height 25 &>/dev/null +fi + +echo "Copying camera.jpg to pacsat txt directory" +sudo rm /home/pi/PacSat/pacsat/txt/camera.jpg +cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/txt/camera.jpg + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value