From 0464281f9cf0e53faa638abece7ba5d160881801 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 7 Feb 2025 17:09:51 -0500 Subject: [PATCH] Update fc_block_decode.py use ssdv_output --- groundstation/fc_block_decode.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index bdb5d3dd..ad835bf6 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -64,14 +64,18 @@ if __name__ == "__main__": print("File error") # 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) - print("\n\n process.stdout: \n") - print(process.stdout) - s = io.StringIO(process.stdout) - for line in s: + system("/home/pi/ssdv/ssdv -d -J image_file " + filename + " > ssdv_output") +# process = subprocess.run(["/home/pi/ssdv/ssdv","-d","-J", "image_file", filename], text=True) +# print("\n\n RESULT: \n") +# print(process) +# print("\n\n process.stdout: \n") +# print(process.stdout) +# s = io.StringIO(process.stdout) +# for line in s: + ssdv_output_file = open("ssdv_output", "r") + for line in ssdv_output_file + print("line:") + print(line) if ((line.find("Image ID:")) > 0): print("\nImage ID found!\n") image_id_string = line.split()