|
|
|
|
@ -26,17 +26,17 @@ Ix, Iy, Iz, Ic, Ib = 0, 0, 0, 0, 0
|
|
|
|
|
frame_count, frame_type = 0, " "
|
|
|
|
|
frequency_string, frequency, errors, first_byte = " ", 0, 0, 0
|
|
|
|
|
|
|
|
|
|
# html_dir = "/home/pi/CubeSatSim/groundstation/public_html/"
|
|
|
|
|
html_dir = "/home/pi/fctelem/public_html/"
|
|
|
|
|
# = "/home/pi/CubeSatSim/groundstation/public_html/"
|
|
|
|
|
= "/home/pi/fctelem/public_html/"
|
|
|
|
|
image_dir = "/home/pi/fctelem/"
|
|
|
|
|
image = "image_file"
|
|
|
|
|
ssdv = "/home/pi/ssdv/ssdv -d -J "
|
|
|
|
|
|
|
|
|
|
system("sudo rm " + image_dir + image)
|
|
|
|
|
#system("sudo rm " + html_dir + "*")
|
|
|
|
|
system("sudo rm " + html_dir + "/images/*")
|
|
|
|
|
#system("sudo rm " + + "*")
|
|
|
|
|
system("sudo rm " + + "/images/*")
|
|
|
|
|
|
|
|
|
|
#system("cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg " + html_dir + "image_file.jpeg")
|
|
|
|
|
#system("cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg " + + "image_file.jpeg")
|
|
|
|
|
|
|
|
|
|
head_string = '<HEAD><meta http-equiv="refresh" content="5"><title>FunCube CubeSatSim Telemetry</title></HEAD>\n<HTML>\n<H2>FunCube CubeSatSim Telemetry</H2>' + \
|
|
|
|
|
'<p><pre> <img height="256" width="320" src="' + image + '.jpeg"><br> <A HREF="images" target="_blank">All images</a><br>'
|
|
|
|
|
@ -140,10 +140,13 @@ if __name__ == "__main__":
|
|
|
|
|
if (new_image_id != image_id):
|
|
|
|
|
print("End of image")
|
|
|
|
|
if (image_id != 256):
|
|
|
|
|
print("Saving complete image")
|
|
|
|
|
newfilename = image_dir + image + str(new_image_id) + ".jpeg"
|
|
|
|
|
# system(ssdv + image_dir + image + " " + filename)
|
|
|
|
|
system("mv " + filename + " " + newfilename)
|
|
|
|
|
system("mv " + image_dir + image + " " + image_dir + image + str(image_id))
|
|
|
|
|
system("mv " + image_dir + image + " " + image_dir + image + str(image_id))
|
|
|
|
|
# system("cp " + filename + " " + html_dir + "images/" + image + str(image_id) + ".jpeg")
|
|
|
|
|
system("cp " + filename + " " + html_dir + "images/")
|
|
|
|
|
else:
|
|
|
|
|
system("sudo rm " + image_dir + image)
|
|
|
|
|
print("New Image ID: ")
|
|
|
|
|
@ -160,8 +163,6 @@ if __name__ == "__main__":
|
|
|
|
|
filename = image_dir + image + str(image_id) + "." + str(image_count) + ".jpeg"
|
|
|
|
|
system(ssdv + image_dir + image + " " + filename)
|
|
|
|
|
system("cp " + filename + " " + html_dir + "image_file.jpeg")
|
|
|
|
|
# system("cp " + filename + " " + html_dir + "images/" + image + str(image_id) + ".jpeg")
|
|
|
|
|
system("cp " + filename + " " + html_dir + "images/")
|
|
|
|
|
telem_string = fstr(telem_string_format)
|
|
|
|
|
with open(html_dir + "index.html", "w") as html_file:
|
|
|
|
|
html_file.write(head_string)
|
|
|
|
|
|