Update transmit.py check for image every second

fc-7
Alan Johnston 10 months ago committed by GitHub
parent d67f8639ce
commit ca10f30b22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -814,25 +814,27 @@ if __name__ == "__main__":
if (mode == 'b'):
sleep(4.2)
else: # FunCube mode image
# print("Checking image_file.bin")
try:
file = open("/home/pi/CubeSatSim/image_file.bin")
file.close()
image_present = True
except:
image_present = False
if (image_present == False):
camera_photo()
## system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1")
## print("Photo taken")
system("/home/pi/ssdv/ssdv -e -n -i " + str(image_id) + " -q 3 -J /home/pi/CubeSatSim/camera_out.jpg /home/pi/CubeSatSim/image_file.bin")
print("image_id: " + str(image_id) + "\n")
image_id = ( image_id + 1 ) % 256
print("new image_id: " + str(image_id) + "\n")
sleep(2)
else:
sleep(4.6)
for i in range(4):
print("Checking image_file.bin")
try:
file = open("/home/pi/CubeSatSim/image_file.bin")
file.close()
# image_present = True
sleep(1.0)
except:
# image_present = False
# if (image_present == False):
camera_photo()
## system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1")
## print("Photo taken")
system("/home/pi/ssdv/ssdv -e -n -i " + str(image_id) + " -q 3 -J /home/pi/CubeSatSim/camera_out.jpg /home/pi/CubeSatSim/image_file.bin")
print("image_id: " + str(image_id) + "\n")
image_id = ( image_id + 1 ) % 256
print("new image_id: " + str(image_id) + "\n")
sleep(0.5)
# else:
sleep(0.6)
elif (mode == 'e'): # code based on https://zr6aic.blogspot.com/2016/11/creating-2m-fm-repeater-with-raspberry.html
print("Repeater")
print("Stopping command and control")

Loading…
Cancel
Save

Powered by TurnKey Linux.