Update fc_block_decode.py frequency is a string

fc-8
Alan Johnston 10 months ago committed by GitHub
parent dc489f6dfe
commit efdc1ed17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,7 @@ sequence, image_id, image_count = 0, 0, 0
Vx, Vy, Vz, Vb = 0, 0, 0, 0 Vx, Vy, Vz, Vb = 0, 0, 0, 0
Ix, Iy, Iz, Ic, Ib = 0, 0, 0, 0, 0 Ix, Iy, Iz, Ic, Ib = 0, 0, 0, 0, 0
frame_count, frame_type = 0, " " frame_count, frame_type = 0, " "
frequency, errors = 0, 0 frequency_string, errors = " ", 0
# html_dir = "/home/pi/CubeSatSim/groundstation/public_html/" # html_dir = "/home/pi/CubeSatSim/groundstation/public_html/"
html_dir = "/home/pi/fctelem/public_html/" html_dir = "/home/pi/fctelem/public_html/"
@ -39,7 +39,7 @@ telem_string_format = " Image: {image_id:3d} count: {image_count:2d}<p
" Vx(mV): {Vx:5d} Vy(mV): {Vy:5d} Vz(mV): {Vz:5d}<p>" + \ " Vx(mV): {Vx:5d} Vy(mV): {Vy:5d} Vz(mV): {Vz:5d}<p>" + \
" Ix(mA): {Ix:5d} Iy(mA): {Iy:5d} Iz(mA): {Iz:5d}<p>" + \ " Ix(mA): {Ix:5d} Iy(mA): {Iy:5d} Iz(mA): {Iz:5d}<p>" + \
" Vbat(mV): {Vb:5d} Ibat(mA): {Ib:5d}<p></pre>" + \ " Vbat(mV): {Vb:5d} Ibat(mA): {Ib:5d}<p></pre>" + \
" Freq: {frequency} errors: {errors} Seq: {sequence:d} {frame_type} frames: {frame_count:d}" " Freq: {frequency_string} errors: {errors} Seq: {sequence:d} {frame_type} frames: {frame_count:d}"
telem_string = fstr(telem_string_format) telem_string = fstr(telem_string_format)
with open(html_dir + "index.html", "w") as html_file: with open(html_dir + "index.html", "w") as html_file:
@ -69,7 +69,7 @@ if __name__ == "__main__":
frame_count += 1 frame_count += 1
data_block_string = line.split() data_block_string = line.split()
# print(data_block_string) # print(data_block_string)
frequency = int(data_block_string[2]) frequency_string = data_block_string[2]
errors = int(data_block_string[5]) errors = int(data_block_string[5])
data_block = [int(number_string,16) for number_string in data_block_string[7:]] data_block = [int(number_string,16) for number_string in data_block_string[7:]]
# print("\n") # print("\n")

Loading…
Cancel
Save

Powered by TurnKey Linux.