minor fixes

This commit is contained in:
Robin Müller 2022-10-19 15:35:52 +02:00
parent b2bab4c964
commit 9051282990
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -30,7 +30,7 @@ def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
coil_x_temperature = struct.unpack("!H", hk_data[24:26])[0]
coil_y_temperature = struct.unpack("!H", hk_data[26:28])[0]
coil_z_temperature = struct.unpack("!H", hk_data[30:32])[0]
mcu_temperature = struct.unpack("!H", hk_data[32:34])[0]
mcu_temperature = struct.unpack("!h", hk_data[32:34])[0]
validity_buffer = hk_data[42:]
content_list = [
@ -58,7 +58,7 @@ def handle_calibrated_mtm_measurement(printer: FsfwTmTcPrinter, hk_data: bytes):
"Calibrated MTM X [nT]",
"Calibrated MTM Y [nT]",
"Calibrated MTM Z [nT]",
"Coild actuation status",
"Coil actuation status",
]
mtm_x = struct.unpack("!I", hk_data[0:4])[0]
mtm_y = struct.unpack("!I", hk_data[4:8])[0]
@ -78,15 +78,15 @@ def handle_raw_mtm_measurement(printer: FsfwTmTcPrinter, hk_data: bytes):
"Raw MTM X [nT]",
"Raw MTM Y [nT]",
"Raw MTM Z [nT]",
"Coild actuation status",
"Coil actuation status",
]
mtm_x = struct.unpack("!f", hk_data[0:4])[0]
mtm_y = struct.unpack("!f", hk_data[4:8])[0]
mtm_z = struct.unpack("!f", hk_data[8:12])[0]
coil_actuation_status = hk_data[12]
validity_buffer = hk_data[12:]
validity_buffer = hk_data[13:]
content_list = [mtm_x, mtm_y, mtm_z, coil_actuation_status]
num_of_vars = len(header_list)
num_of_vars = 2
pw.dlog(str(header_list))
pw.dlog(str(content_list))
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=num_of_vars)