made parsed hk in json an array, so it can be iterated in order
This commit is contained in:
parent
b0bdb2208f
commit
dff2c1b041
@ -305,23 +305,24 @@ def handle_thermal_controller_hk_data(object_id: ObjectId, printer: FsfwTmTcPrin
|
|||||||
tm_data = struct.unpack("!ffffffffffffffff", hk_data[:16 * 4])
|
tm_data = struct.unpack("!ffffffffffffffff", hk_data[:16 * 4])
|
||||||
parsed_data = {}
|
parsed_data = {}
|
||||||
|
|
||||||
# put them into a nice dictionary
|
# put them into an list with their names
|
||||||
parsed_data["SENSOR_PLOC_HEATSPREADER"] = tm_data[0]
|
parsed_data = []
|
||||||
parsed_data["SENSOR_PLOC_MISSIONBOARD"] = tm_data[1]
|
parsed_data.append({"SENSOR_PLOC_HEATSPREADER": tm_data[0]})
|
||||||
parsed_data["SENSOR_4K_CAMERA"] = tm_data[2]
|
parsed_data.append({"SENSOR_PLOC_MISSIONBOARD": tm_data[1]})
|
||||||
parsed_data["SENSOR_DAC_HEATSPREADER"] = tm_data[3]
|
parsed_data.append({"SENSOR_4K_CAMERA": tm_data[2]})
|
||||||
parsed_data["SENSOR_STARTRACKER"] = tm_data[4]
|
parsed_data.append({"SENSOR_DAC_HEATSPREADER": tm_data[3]})
|
||||||
parsed_data["SENSOR_RW1"] = tm_data[5]
|
parsed_data.append({"SENSOR_STARTRACKER": tm_data[4]})
|
||||||
parsed_data["SENSOR_DRO"] = tm_data[6]
|
parsed_data.append({"SENSOR_RW1": tm_data[5]})
|
||||||
parsed_data["SENSOR_SCEX"] = tm_data[7]
|
parsed_data.append({"SENSOR_DRO": tm_data[6]})
|
||||||
parsed_data["SENSOR_X8"] = tm_data[8]
|
parsed_data.append({"SENSOR_SCEX": tm_data[7]})
|
||||||
parsed_data["SENSOR_HPA"] = tm_data[9]
|
parsed_data.append({"SENSOR_X8": tm_data[8]})
|
||||||
parsed_data["SENSOR_TX_MODUL"] = tm_data[10]
|
parsed_data.append({"SENSOR_HPA": tm_data[9]})
|
||||||
parsed_data["SENSOR_MPA"] = tm_data[11]
|
parsed_data.append({"SENSOR_TX_MODUL": tm_data[10]})
|
||||||
parsed_data["SENSOR_ACU"] = tm_data[12]
|
parsed_data.append({"SENSOR_MPA": tm_data[11]})
|
||||||
parsed_data["SENSOR_PLPCDU_HEATSPREADER"] = tm_data[13]
|
parsed_data.append({"SENSOR_ACU": tm_data[12]})
|
||||||
parsed_data["SENSOR_TCS_BOARD"] = tm_data[14]
|
parsed_data.append({"SENSOR_PLPCDU_HEATSPREADER": tm_data[13]})
|
||||||
parsed_data["SENSOR_MAGNETTORQUER"] = tm_data[15]
|
parsed_data.append({"SENSOR_TCS_BOARD": tm_data[14]})
|
||||||
|
parsed_data.append({"SENSOR_MAGNETTORQUER": tm_data[15]})
|
||||||
|
|
||||||
TM_TCP_SERVER.report_parsed_hk_data(object_id, set_id, parsed_data)
|
TM_TCP_SERVER.report_parsed_hk_data(object_id, set_id, parsed_data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user