This commit is contained in:
Robin Müller 2023-01-19 16:28:30 +01:00
commit dfa5cad8a6
4 changed files with 25 additions and 31 deletions

View File

@ -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

View File

@ -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(

View File

@ -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)

View File

@ -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))