kill all the duplication
This commit is contained in:
@ -44,7 +44,7 @@ def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):
|
||||
coil_x_temperature,
|
||||
coil_y_temperature,
|
||||
coil_z_temperature,
|
||||
mcu_temperature
|
||||
mcu_temperature,
|
||||
]
|
||||
num_of_vars = len(header_list)
|
||||
pw.dlog(str(header_list))
|
||||
@ -58,19 +58,14 @@ 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"
|
||||
"Coild actuation status",
|
||||
]
|
||||
mtm_x = struct.unpack("!I", hk_data[0:4])[0]
|
||||
mtm_y = struct.unpack("!I", hk_data[4:8])[0]
|
||||
mtm_z = struct.unpack("!I", hk_data[8:12])[0]
|
||||
coil_actuation_status = hk_data[12]
|
||||
validity_buffer = hk_data[12:]
|
||||
content_list = [
|
||||
mtm_x,
|
||||
mtm_y,
|
||||
mtm_z,
|
||||
coil_actuation_status
|
||||
]
|
||||
content_list = [mtm_x, mtm_y, mtm_z, coil_actuation_status]
|
||||
num_of_vars = len(header_list)
|
||||
pw.dlog(str(header_list))
|
||||
pw.dlog(str(content_list))
|
||||
@ -83,19 +78,14 @@ 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"
|
||||
"Coild 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:]
|
||||
content_list = [
|
||||
mtm_x,
|
||||
mtm_y,
|
||||
mtm_z,
|
||||
coil_actuation_status
|
||||
]
|
||||
content_list = [mtm_x, mtm_y, mtm_z, coil_actuation_status]
|
||||
num_of_vars = len(header_list)
|
||||
pw.dlog(str(header_list))
|
||||
pw.dlog(str(content_list))
|
||||
|
Reference in New Issue
Block a user