Update transmit.py FC send stored image if no camera

fc-jy-img
Alan Johnston 11 months ago committed by GitHub
parent 30aa9bb422
commit 6baa23169e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -136,10 +136,17 @@ def increment_mode():
print("can't write to .mode file")
def camera_photo():
stored_image = False
try:
system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1")
f = open("/home/pi/CubeSatSim/camera_out.jpg")
f.close()
print("Photo taken")
except:
system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg")
print("Using stored image")
stored_image = True
if (stored_image == False):
file='/home/pi/CubeSatSim/camera_out.jpg'
font1 = ImageFont.truetype('DejaVuSerif.ttf', 20)
font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16)

Loading…
Cancel
Save

Powered by TurnKey Linux.