From 01a681cb5c99596383f5d64a2c81f457d5024b47 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Feb 2025 22:11:14 -0500 Subject: [PATCH] Update fc_block_decode.py line breaks --- groundstation/fc_block_decode.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index 29ed3646..f5a8a414 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -28,7 +28,8 @@ Iy = 0 Iz = 0 Ib = 0 -head_string = '\n\n

FunCube CubeSatSim Telemetry

\n

\n

  
' +head_string = '\n\n

FunCube CubeSatSim Telemetry

\"' + + 'n

\n

  
' foot_string = "

\n" telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}

Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV

Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA

Vb: {Vb:5d} mV Ib: {Ib:5d} mA" with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: @@ -90,7 +91,8 @@ if __name__ == "__main__": except: print("File error") # try: - system("/home/pi/ssdv/ssdv -d -J /home/pi/fctelem/image_file_payload /home/pi/fctelem/image_file_payload.jpeg 2>&1 | sudo tee /home/pi/fctelem/ssdv_output") + system("/home/pi/ssdv/ssdv -d -J /home/pi/fctelem/image_file_payload " + + "/home/pi/fctelem/image_file_payload.jpeg 2>&1 | sudo tee /home/pi/fctelem/ssdv_output") with open("/home/pi/fctelem/ssdv_output", "r") as file: for line in file: # print("line:") @@ -124,7 +126,9 @@ 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 = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}

Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV

Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA

Vb: {Vb:5d} mV Ib: {Ib:5d} mA" + telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}

" + + "Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV

Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA

" + + "Vb: {Vb:5d} mV Ib: {Ib:5d} mA" with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: html_file.write(head_string) html_file.write(telem_string)