From c01f1d01916160888cf745ee3db6a2c46d795408 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 23 May 2022 11:25:33 +0200 Subject: [PATCH] run black --- gomspace/gomspace_common.py | 4 +++- pus_tc/devs/acu.py | 32 ++++++++++++++++++-------------- pus_tc/devs/pcdu.py | 10 ++++++---- tmtccmd | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/gomspace/gomspace_common.py b/gomspace/gomspace_common.py index 5fe1cb9..6e82950 100644 --- a/gomspace/gomspace_common.py +++ b/gomspace/gomspace_common.py @@ -139,7 +139,9 @@ def pack_ping_command(object_id: ObjectId, data: bytearray) -> PusTelecommand: data are simply copied by the device and then sent back. """ return generate_action_command( - object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.PING, app_data=data + object_id=object_id.as_bytes, + action_id=GomspaceDeviceActionIds.PING, + app_data=data, ) diff --git a/pus_tc/devs/acu.py b/pus_tc/devs/acu.py index 4379dca..06d6533 100644 --- a/pus_tc/devs/acu.py +++ b/pus_tc/devs/acu.py @@ -7,7 +7,11 @@ from config.definitions import CustomServiceList from tmtccmd.config import add_op_code_entry, add_service_op_code_entry from tmtccmd.tc.packer import TcQueueT from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT -from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_diag_command, generate_one_hk_command +from tmtccmd.tc.pus_3_fsfw_hk import ( + make_sid, + generate_one_diag_command, + generate_one_hk_command, +) import gomspace.gomspace_common as gs from gomspace.gomspace_common import GomspaceOpCodes from gomspace.gomspace_common import Info as GsInfo @@ -47,28 +51,24 @@ def add_acu_cmds(cmd_dict: ServiceOpCodeDictT): add_op_code_entry( op_code_dict=op_code_dict, keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, - info=GsInfo.REQUEST_CORE_HK_ONCE + info=GsInfo.REQUEST_CORE_HK_ONCE, ) add_op_code_entry( op_code_dict=op_code_dict, keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, - info=GsInfo.REQUEST_AUX_HK_ONCE + info=GsInfo.REQUEST_AUX_HK_ONCE, ) add_op_code_entry( op_code_dict=op_code_dict, keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, - info=GsInfo.REQUEST_AUX_HK_ONCE - ) - add_op_code_entry( - op_code_dict=op_code_dict, - keys=OpCodes.TEST, - info=Info.TEST + info=GsInfo.REQUEST_AUX_HK_ONCE, ) + add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.TEST, info=Info.TEST) add_service_op_code_entry( srv_op_code_dict=cmd_dict, op_code_entry=op_code_dict, name=CustomServiceList.ACU.value, - info="ACU Device" + info="ACU Device", ) @@ -80,16 +80,20 @@ def pack_acu_commands( tc_queue.appendleft((QueueCommands.PRINT, "ACU: Print channel stats")) command = generate_action_command( object_id=object_id.as_bytes, - action_id=gs.GomspaceDeviceActionIds.PRINT_SWITCH_V_I + action_id=gs.GomspaceDeviceActionIds.PRINT_SWITCH_V_I, ) tc_queue.appendleft(command.pack_command_tuple()) if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE: - tc_queue.appendleft((QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_CORE_HK_ONCE}")) + tc_queue.appendleft( + (QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_CORE_HK_ONCE}") + ) hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_CORE) command = generate_one_diag_command(sid=hk_sid, ssc=0) tc_queue.appendleft(command.pack_command_tuple()) if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE: - tc_queue.appendleft((QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_AUX_HK_ONCE}")) + tc_queue.appendleft( + (QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_AUX_HK_ONCE}") + ) hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_AUX) command = generate_one_hk_command(sid=hk_sid, ssc=0) tc_queue.appendleft(command.pack_command_tuple()) @@ -208,4 +212,4 @@ def pack_test_cmds(object_id: ObjectId, tc_queue: TcQueueT): P60DockConfigTable.out_en_0.parameter_size, gs.Channel.off, ) - tc_queue.appendleft(command.pack_command_tuple()) \ No newline at end of file + tc_queue.appendleft(command.pack_command_tuple()) diff --git a/pus_tc/devs/pcdu.py b/pus_tc/devs/pcdu.py index 9cab064..bd95d3d 100644 --- a/pus_tc/devs/pcdu.py +++ b/pus_tc/devs/pcdu.py @@ -1,6 +1,10 @@ from config.definitions import CustomServiceList -from tmtccmd.config import ServiceOpCodeDictT, add_op_code_entry, add_service_op_code_entry, \ - OpCodeDictKeys +from tmtccmd.config import ( + ServiceOpCodeDictT, + add_op_code_entry, + add_service_op_code_entry, + OpCodeDictKeys, +) from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, Info from pus_tc.devs.pdu1 import Pdu1OpCodes @@ -291,5 +295,3 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): add_pdu1_cmds(cmd_dict) add_pdu2_cmds(cmd_dict) add_acu_cmds(cmd_dict) - - diff --git a/tmtccmd b/tmtccmd index 4fbbf12..0e193f9 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit 4fbbf129e140e593b1cc54a0361fa20cc8726789 +Subproject commit 0e193f9c76973a6105926ed133b179f8ea467981