From b563c3fad46851eff093edc610430a7fed901437 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 27 Apr 2023 09:17:31 -0400 Subject: [PATCH] add copy of camera_out .jpg to payload directory --- rpitx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpitx.py b/rpitx.py index 26145b1f..d0368c75 100644 --- a/rpitx.py +++ b/rpitx.py @@ -3,7 +3,7 @@ import RPi.GPIO as GPIO from RPi.GPIO import output #import subprocess -#import time +import time from time import sleep #import os import sys @@ -236,6 +236,9 @@ if __name__ == "__main__": print("image 2 did not load - copy from CubeSatSim/sstv directory") while 1: system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") +# current_time = time.strftime("%H;%M;%S", time.localtime()) + current_time = time.strftime("%m-%d-%H%M%S", time.localtime()) + system("cp /home/pi/CubeSatSim/camera_out.jpg " + "/home/pi/payload/img"+current_time+".jpg") print("Photo taken") system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/camera_out.jpg") system("sudo rm /home/pi/CubeSatSim/camera_out.jpg > /dev/null 2>&1")