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

Loading…
Cancel
Save

Powered by TurnKey Linux.