diff --git a/config/custom_mode_op.py b/config/custom_mode_op.py index 51c15d7..7085520 100644 --- a/config/custom_mode_op.py +++ b/config/custom_mode_op.py @@ -16,4 +16,4 @@ class CustomModeList(enum.IntEnum): def custom_mode_operation(tmtc_backend: TmTcHandler, mode: int): - pass \ No newline at end of file + pass diff --git a/config/definitions.py b/config/definitions.py index ecedaf3..2fdc4fe 100644 --- a/config/definitions.py +++ b/config/definitions.py @@ -15,4 +15,3 @@ class CustomServiceList(enum.IntEnum): TMP1075_1 = "tmp1075_1" TMP1075_2 = "tmp1075_2" HEATER = "heater" - diff --git a/config/globals_config.py b/config/globals_config.py index a1da801..ce1cde4 100644 --- a/config/globals_config.py +++ b/config/globals_config.py @@ -26,8 +26,7 @@ class CustomGlobalIds(enum.Enum): pass -def add_globals_pre_args_parsing(gui: bool = False): - +def set_globals_pre_args_parsing(gui: bool = False): set_default_globals_pre_args_parsing(apid=0x65, com_if_id=CoreComInterfaces.EthernetUDP) servicelist = dict() diff --git a/config/hook_implementations.py b/config/hook_implementations.py index af4b079..d939920 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -20,8 +20,8 @@ class EiveHookObject(TmTcHookBase): return f"{SW_NAME} {VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_SUBMINOR}" def add_globals_pre_args_parsing(self, gui: bool = False): - from config.globals_config import add_globals_pre_args_parsing - add_globals_pre_args_parsing(gui) + from config.globals_config import set_globals_pre_args_parsing + set_globals_pre_args_parsing(gui=gui) def add_globals_post_args_parsing(self, args: argparse.Namespace): from config.globals_config import add_globals_post_args_parsing diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index 562c7ce..98c29f4 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -5,6 +5,7 @@ @author J. Meier @date 17.12.2020 """ +from tmtccmd.core.definitions import QueueCommands from tmtccmd.pus_tc.packer import TcQueueT from tmtccmd.pus_tc.base import PusTelecommand @@ -25,24 +26,30 @@ class PDU1TestProcedure: read_temperature = False -def pack_pdu1_test_into(pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT: - tc_queue.appendleft(("print", "Testing PDU1")) +def pack_pdu1_test_into( + pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT +): + tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU1")) - tc_queue.appendleft(("print", "P60 Dock: Enabling PDU1")) - command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_1.parameter_address, - P60DockConfigTable.out_en_1.parameter_size, Channel.on) + tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling PDU1")) + command = pack_set_param_command( + p60dock_object_id, P60DockConfigTable.out_en_1.parameter_address, + P60DockConfigTable.out_en_1.parameter_size, Channel.on + ) command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.ping: - tc_queue.appendleft(("print", "PDU1: Ping Test")) + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test")) ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) command = pack_ping_command(pdu1_object_id, ping_data) command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature: - tc_queue.appendleft(("print", "PDU1: Testing temperature reading")) - command = pack_get_param_command(pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address, - PDUHkTable.temperature.parameter_size) + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading")) + command = pack_get_param_command( + pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address, + PDUHkTable.temperature.parameter_size + ) command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) diff --git a/pus_tc/pdu2.py b/pus_tc/pdu2.py index caeb00b..f4a80ea 100644 --- a/pus_tc/pdu2.py +++ b/pus_tc/pdu2.py @@ -27,7 +27,7 @@ class PDU2TestProcedure: 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 + read_cur_lu_lim_0 = False # OBC 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 diff --git a/pus_tc/tmp1075.py b/pus_tc/tmp1075.py index f0acfdb..9dba368 100644 --- a/pus_tc/tmp1075.py +++ b/pus_tc/tmp1075.py @@ -5,6 +5,7 @@ @author J. Meier @date 06.01.2021 """ +from tmtccmd.core.definitions import QueueCommands from tmtccmd.pus_tc.packer import TcQueueT from tmtccmd.pus_tc.base import PusTelecommand @@ -30,29 +31,31 @@ class Tmp1075ActionIds: def pack_tmp1075_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT: - tc_queue.appendleft(("print", "Testing Tmp1075 Temperature Sensor Handler with object id: 0x" + - object_id.hex())) + tc_queue.appendleft( + (QueueCommands.PRINT, + "Testing Tmp1075 Temperature Sensor Handler with object id: 0x" + object_id.hex()) + ) if Tmp1075TestProcedure.all or Tmp1075TestProcedure.start_adc_conversion: - tc_queue.appendleft(("print", "TMP1075: Starting new temperature conversion")) + tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Starting new temperature conversion")) command = object_id + Tmp1075ActionIds.start_adc_conversion command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if Tmp1075TestProcedure.all or Tmp1075TestProcedure.get_temp: - tc_queue.appendleft(("print", "TMP1075: Read temperature")) + tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Read temperature")) command = object_id + Tmp1075ActionIds.get_temp command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if Tmp1075TestProcedure.set_mode_normal: - tc_queue.appendleft(("print", "TMP1075: Set Mode Normal")) + tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode Normal")) mode_data = pack_mode_data(object_id, 2, 0) command = PusTelecommand(service=200, subservice=1, ssc=220, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) if Tmp1075TestProcedure.set_mode_on: - tc_queue.appendleft(("print", "TMP1075: Set Mode On")) + tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode On")) mode_data = pack_mode_data(object_id, 1, 0) command = PusTelecommand(service=200, subservice=1, ssc=221, app_data=mode_data) tc_queue.appendleft(command.pack_command_tuple()) diff --git a/tmtccmd b/tmtccmd index bef9dc2..6cdd05f 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit bef9dc2b1bd046521f215901812fbbe8668a418c +Subproject commit 6cdd05fbe1c4582a23a975a5401bf5fe833c04b8