PLOC Commands #64

Merged
muellerr merged 15 commits from meier/ploc into develop 2022-05-05 00:37:14 +02:00
3 changed files with 1 additions and 21 deletions
Showing only changes of commit 9c3a8e9ff2 - Show all commits

View File

@ -616,8 +616,6 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
"46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}), "46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}),
"47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}), "47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
"48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}), "48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
"49": ("PLOC Supervisor: Enable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
"50": ("PLOC Supervisor: Disable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
"51": ("PLOC Supervisor: Logging request event buffers", {OpCodeDictKeys.TIMEOUT: 2.0}), "51": ("PLOC Supervisor: Logging request event buffers", {OpCodeDictKeys.TIMEOUT: 2.0}),
"52": ("PLOC Supervisor: Logging clear counters", {OpCodeDictKeys.TIMEOUT: 2.0}), "52": ("PLOC Supervisor: Logging clear counters", {OpCodeDictKeys.TIMEOUT: 2.0}),
"53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}), "53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}),

View File

@ -82,8 +82,6 @@ class SupvActionIds:
TERMINATE_SUPV_HELPER = 49 TERMINATE_SUPV_HELPER = 49
ENABLE_AUTO_TM = 50 ENABLE_AUTO_TM = 50
DISABLE_AUTO_TM = 51 DISABLE_AUTO_TM = 51
ENABLE_ADC_MONITOR_TASK = 52
DISABLE_ADC_MONITOR_TASK = 53
LOGGING_REQUEST_EVENT_BUFFERS = 54 LOGGING_REQUEST_EVENT_BUFFERS = 54
LOGGING_CLEAR_COUNTERS = 55 LOGGING_CLEAR_COUNTERS = 55
LOGGING_SET_TOPIC = 56 LOGGING_SET_TOPIC = 56
@ -348,20 +346,6 @@ def pack_ploc_supv_commands(
) )
command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command) command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "49":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable ADC monitor task"))
command = object_id + struct.pack(
"!I", SupvActionIds.ENABLE_ADC_MONITOR_TASK
)
command = PusTelecommand(service=8, subservice=128, ssc=64, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "50":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable ADC monitor task"))
command = object_id + struct.pack(
"!I", SupvActionIds.DISABLE_ADC_MONITOR_TASK
)
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "51": elif op_code == "51":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers")) tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers"))
command = pack_logging_buffer_request(object_id) command = pack_logging_buffer_request(object_id)

View File

@ -88,15 +88,13 @@ def handle_supervisor_replies(
printer.file_logger.info(content_list) printer.file_logger.info(content_list)
elif action_id == SupvActionIds.READ_GPIO: elif action_id == SupvActionIds.READ_GPIO:
header_list = ["GPIO state"] header_list = ["GPIO state"]
content_list = [custom_data[0]] content_list = [struct.unpack('!H', custom_data[:2])[0]]
print(header_list) print(header_list)
print(content_list) print(content_list)
printer.file_logger.info(header_list) printer.file_logger.info(header_list)
printer.file_logger.info(content_list) printer.file_logger.info(content_list)
def handle_startracker_replies( def handle_startracker_replies(
action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray action_id: int, printer: FsfwTmTcPrinter, custom_data: bytearray
): ):