From 4433fb68ac268ab72f763c2ef80b13d84600ad47 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Thu, 11 Feb 2021 08:18:42 +0100 Subject: [PATCH] heater print adaption --- pus_tc/tmtcc_tc_heater.py | 12 ++++++------ pus_tc/tmtcc_tc_pdu2.py | 10 +++++----- pus_tm/tmtcc_pus_service_8_hook.py | 11 +++++++++-- pus_tm/tmtcc_pus_tm_factory_hook.py | 1 - 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/pus_tc/tmtcc_tc_heater.py b/pus_tc/tmtcc_tc_heater.py index db181f8..3e595f1 100644 --- a/pus_tc/tmtcc_tc_heater.py +++ b/pus_tc/tmtcc_tc_heater.py @@ -5,7 +5,7 @@ @author J. Meier @date 30.01.2021 """ - +from tmtc_core.core.tmtc_core_definitions import QueueCommands from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand @@ -14,8 +14,8 @@ class TestProcedure: """ @brief The variables in this class can be used to configure the heater test procedure. """ - on = True # All heaters will be turned on - off = False # All heaters will be turned off + on = False # All heaters will be turned on + off = True # All heaters will be turned off class SwitchNumbers: @@ -32,15 +32,15 @@ class ActionIds: def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT: - tc_queue.appendleft(("print", "Testing Heater Switching")) + tc_queue.appendleft((QueueCommands.PRINT, "Testing Heater Switching")) if TestProcedure.on: - tc_queue.appendleft(("print", "Switching on heater of payload camera")) + tc_queue.appendleft((QueueCommands.PRINT, "Switching on heater of payload camera")) command = pack_switch_heater_command(object_id, SwitchNumbers.PAYLOAD_CAMERA_HEATER, SwitchActions.ON) command = PusTelecommand(service=8, subservice=128, ssc=300, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if TestProcedure.off: - tc_queue.appendleft(("print", "Switching off heater of payload camera")) + tc_queue.appendleft((QueueCommands.PRINT, "Switching off heater of payload camera")) command = pack_switch_heater_command(object_id, SwitchNumbers.PAYLOAD_CAMERA_HEATER, SwitchActions.OFF) command = PusTelecommand(service=8, subservice=128, ssc=301, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) diff --git a/pus_tc/tmtcc_tc_pdu2.py b/pus_tc/tmtcc_tc_pdu2.py index a556cc0..eeb1cb4 100644 --- a/pus_tc/tmtcc_tc_pdu2.py +++ b/pus_tc/tmtcc_tc_pdu2.py @@ -24,15 +24,15 @@ class PDU2TestProcedure: read_gnd_wdt = False gnd_wdt_reset = False ping = False - channel_2_off = False # TCS Heater - read_temperature = False - read_channel_2_state = False # TCS Heater + channel_2_off = False # Reaction wheels 5V + read_temperature = True + read_channel_2_state = False # Reaction wheels 5V read_cur_lu_lim_0 = False # OBC - channel_2_on = False # TCS Heater + channel_2_on = False # Reaction wheels 5V invalid_table_id_test = False # Test to check if software properly handles invalid table ids invalid_address_test = False # Test to check if software properly handles invalid addresses invalid_parameter_size_test = False - request_hk_table = True + request_hk_table = False def pack_pdu2_test_into(pdu2_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT: diff --git a/pus_tm/tmtcc_pus_service_8_hook.py b/pus_tm/tmtcc_pus_service_8_hook.py index 5797dee..3502703 100644 --- a/pus_tm/tmtcc_pus_service_8_hook.py +++ b/pus_tm/tmtcc_pus_service_8_hook.py @@ -23,8 +23,15 @@ def user_analyze_service_8_data( @return: """ if object_id.value == ObjectIds.PDU2_HANDLER_ID.value: - header_list = ['Housekeeping Table'] - content_list = [custom_data] + header_list = ['PDU2 Service 8 Reply'] + + data_string = str() + for index in range(len(custom_data)): + data_string += str(hex(custom_data[index])) + " , " + data_string = data_string.rstrip() + data_string = data_string.rstrip(',') + data_string = data_string.rstrip() + content_list = [data_string] else: header_list = [] content_list = [] diff --git a/pus_tm/tmtcc_pus_tm_factory_hook.py b/pus_tm/tmtcc_pus_tm_factory_hook.py index 384ae17..1d26475 100644 --- a/pus_tm/tmtcc_pus_tm_factory_hook.py +++ b/pus_tm/tmtcc_pus_tm_factory_hook.py @@ -22,7 +22,6 @@ def tm_user_factory_hook(raw_tm_packet: bytearray) -> PusTelemetry: return Service5TM(raw_tm_packet) if service_type == 8: service8tm = Service8TM(raw_tm_packet) - service8tm.print_source_data() return Service8TM(raw_tm_packet) if service_type == 17: return Service17TM(raw_tm_packet)