From 6a82b8c80427019cfb0b873997f3784995eeb5de Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Feb 2025 11:50:57 -0500 Subject: [PATCH] Update fc_block_decode.py add head and foot to html --- groundstation/fc_block_decode.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index baa2ffe7..26b17f21 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -96,10 +96,13 @@ if __name__ == "__main__": filename = "/home/pi/fctelem/image_file" + str(image_id) + "." + str(image_count) + ".jpeg" system("/home/pi/ssdv/ssdv -d -J /home/pi/fctelem/image_file " + filename) system("cp " + filename + " /home/pi/CubeSatSim/groundstation/public_html/image_file.jpeg") - telem_string = "\nSequence number: " + str(sequence) - with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "a") as html_file: - html_file.write(telem_string) - + head_string = '\n\nFunCube CubeSatSim Telemetry\n

\n' + telem_string = "\nSequence number: " + str(sequence) + "\nImage ID: " + str(image_id) + " count: " + str(image_count) + foot_string = "

\n" + with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: + html_file.write(heat_string) + html_file.write(telem_string) + html_file.write(foot_string) else: print("Payload not an image!") image_id = 256 # set illegal image_id to force new image