From 2f3eab73a8cbe585a03fb1b32b41a071f4154943 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 7 Feb 2025 15:18:52 -0500 Subject: [PATCH] Update fc_block_decode.py add import subprocess --- groundstation/fc_block_decode.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index 8e7243e7..d4ae576d 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -4,6 +4,7 @@ from time import sleep import logging import random from PIL import Image, ImageDraw, ImageFont, ImageColor +import subprocess logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') @@ -60,17 +61,17 @@ if __name__ == "__main__": except: print("File error") - try: - filename = "image_file" + str(image_count) + "." + str(image_index) + ".jpeg" +# try: + filename = "image_file" + str(image_count) + "." + str(image_index) + ".jpeg" # system("/home/pi/ssdv/ssdv -d -J image_file " + filename) - process = subprocess.run(["/home/pi/ssdv/ssdv","-d","-J", image_file, filename], text=True) - print("\n\n RESULT: \n") - print(process) - system("sudo cp " + filename + " /home/pi/CubeSatSim/groundstation/public_html/image_file.jpeg") + process = subprocess.run(["/home/pi/ssdv/ssdv","-d","-J", image_file, filename], text=True) + print("\n\n RESULT: \n") + print(process) + system("sudo cp " + filename + " /home/pi/CubeSatSim/groundstation/public_html/image_file.jpeg") # image = Image.open("image_file" + str(image_count) + "." + str(image_index) + ".jpeg") # image.show() - except: - print("Image display error") +# except: +# print("Image display error") image_index += 1 else: print("End of image")