Update fc_block_decode.py line breaks

fc-7
Alan Johnston 10 months ago committed by GitHub
parent bddd417197
commit 01a681cb5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -28,7 +28,8 @@ Iy = 0
Iz = 0 Iz = 0
Ib = 0 Ib = 0
head_string = '<HEAD><meta http-equiv="refresh" content="5"></HEAD>\n<HTML>\n<H2>FunCube CubeSatSim Telemetry</H2>\n<p>\n<pre> <img height="256" width="320" src="image_file.jpeg"><br>' head_string = '<HEAD><meta http-equiv="refresh" content="5"></HEAD>\n<HTML>\n<H2>FunCube CubeSatSim Telemetry</H2>\"' +
'n<p>\n<pre> <img height="256" width="320" src="image_file.jpeg"><br>'
foot_string = "</pre></p>\n</HTML>" foot_string = "</pre></p>\n</HTML>"
telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}<p>Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV<p>Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA<p>Vb: {Vb:5d} mV Ib: {Ib:5d} mA" telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}<p>Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV<p>Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA<p>Vb: {Vb:5d} mV Ib: {Ib:5d} mA"
with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file:
@ -90,7 +91,8 @@ if __name__ == "__main__":
except: except:
print("File error") print("File error")
# try: # 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: with open("/home/pi/fctelem/ssdv_output", "r") as file:
for line in file: for line in file:
# print("line:") # print("line:")
@ -124,7 +126,9 @@ if __name__ == "__main__":
filename = "/home/pi/fctelem/image_file" + str(image_id) + "." + str(image_count) + ".jpeg" 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("/home/pi/ssdv/ssdv -d -J /home/pi/fctelem/image_file " + filename)
system("cp " + filename + " /home/pi/CubeSatSim/groundstation/public_html/image_file.jpeg") 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}<p>Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV<p>Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA<p>Vb: {Vb:5d} mV Ib: {Ib:5d} mA" telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}<p>" +
"Vx: {Vx:5d} mV Vy: {Vy:5d} mV Vz: {Vz:5d} mV<p>Ix: {Ix:5d} mA Iy: {Iy:5d} mA Iz: {Iz:5d} mA<p>" +
"Vb: {Vb:5d} mV Ib: {Ib:5d} mA"
with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file:
html_file.write(head_string) html_file.write(head_string)
html_file.write(telem_string) html_file.write(telem_string)

Loading…
Cancel
Save

Powered by TurnKey Linux.