diff --git a/eive_tmtc/tmtc/__init__.py b/eive_tmtc/tmtc/__init__.py index 22d3893..d78d994 100644 --- a/eive_tmtc/tmtc/__init__.py +++ b/eive_tmtc/tmtc/__init__.py @@ -1,2 +1,3 @@ from .payload.pl_subsystem import add_payload_subsystem_cmds +from .solar_array_deployment import add_sa_depl_cmds from .test import add_test_defs diff --git a/eive_tmtc/tmtc/solar_array_deployment.py b/eive_tmtc/tmtc/solar_array_deployment.py index 7d8765d..f8f91b9 100644 --- a/eive_tmtc/tmtc/solar_array_deployment.py +++ b/eive_tmtc/tmtc/solar_array_deployment.py @@ -35,7 +35,7 @@ class ActionId: @tmtc_definitions_provider -def pack_sa_depl_cmds(defs: TmtcDefinitionWrapper): +def add_sa_depl_cmds(defs: TmtcDefinitionWrapper): oce = OpCodeEntry() oce.add(keys=OpCode.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT) defs.add_service( diff --git a/eive_tmtc/tmtc/tcs.py b/eive_tmtc/tmtc/tcs.py index 61cb2f1..230ded5 100644 --- a/eive_tmtc/tmtc/tcs.py +++ b/eive_tmtc/tmtc/tcs.py @@ -144,9 +144,6 @@ def handle_thermal_controller_hk_data( printer.file_logger.info(str(parsed_data)) pp = pprint.PrettyPrinter(depth=4) pp.pprint(parsed_data) - # tcp_server_sensor_temperatures.report_parsed_hk_data( - # object_id, set_id, parsed_data - # ) elif set_id == SetId.DEVICE_SENSORS: pw = PrintWrapper(printer) pw.dlog("Received device temperature data") @@ -184,29 +181,25 @@ def handle_thermal_controller_hk_data( printer.file_logger.info(str(parsed_data)) pp = pprint.PrettyPrinter(depth=4) pp.pprint(parsed_data) - # print(parsed_data) - # tcp_server_device_temperatures.report_parsed_hk_data( - # object_id, set_id, parsed_data - # ) elif set_id == SetId.SUS_TEMP_SENSORS: - pass - # pw = PrintWrapper(printer) - # pw.dlog("Received SUS temperature data") - # fmt_str = "!ffffffffffffffffff" - # tm_data = struct.unpack(fmt_str, hk_data[:4 * 18]) - # parsed_data = { - # "SUS_0": tm_data[0], - # "SUS_1": tm_data[1], - # "SUS_2": tm_data[2], - # "SUS_3": tm_data[3], - # "SUS_4": tm_data[4], - # "SUS_5": tm_data[5], - # "SUS_6": tm_data[6], - # "SUS_7": tm_data[7], - # "SUS_8": tm_data[8], - # "SUS_9": tm_data[9], - # "SUS_10": tm_data[10], - # "SUS_11": tm_data[11], - # } - # print(parsed_data) - # TODO: Forward data to space simulator + pw = PrintWrapper(printer) + pw.dlog("Received SUS temperature data") + fmt_str = "!ffffffffffffffffff" + tm_data = struct.unpack(fmt_str, hk_data[: 4 * 18]) + parsed_data = { + "SUS_0": tm_data[0], + "SUS_1": tm_data[1], + "SUS_2": tm_data[2], + "SUS_3": tm_data[3], + "SUS_4": tm_data[4], + "SUS_5": tm_data[5], + "SUS_6": tm_data[6], + "SUS_7": tm_data[7], + "SUS_8": tm_data[8], + "SUS_9": tm_data[9], + "SUS_10": tm_data[10], + "SUS_11": tm_data[11], + } + printer.file_logger.info(str(parsed_data)) + pp = pprint.PrettyPrinter(depth=4) + pp.pprint(parsed_data) diff --git a/eive_tmtc/tmtc/test.py b/eive_tmtc/tmtc/test.py index 1a7985c..ad292fd 100644 --- a/eive_tmtc/tmtc/test.py +++ b/eive_tmtc/tmtc/test.py @@ -5,7 +5,7 @@ from tmtccmd.config.tmtc import ( TmtcDefinitionWrapper, OpCodeEntry, ) -from tmtccmd.pus.s17_test import pack_service_17_ping_command +from tmtccmd.pus.s17_test import create_service_17_ping_command from tmtccmd.tc import service_provider from tmtccmd.tc.decorator import ServiceProviderParams @@ -42,7 +42,7 @@ def pack_test_command(p: ServiceProviderParams): q = p.queue_helper if info.op_code == OpCodes.PING: q.add_log_cmd("Sending PUS TC [17,1]") - q.add_pus_tc(pack_service_17_ping_command()) + q.add_pus_tc(create_service_17_ping_command()) if info.op_code == OpCodes.TRIGGER_EVENT: q.add_log_cmd("Sending PUS TC Event Trigger [17, 128]") q.add_pus_tc(PusTelecommand(service=PusService.S17_TEST, subservice=128))