run black
This commit is contained in:
parent
ea1e440407
commit
c01f1d0191
@ -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.
|
data are simply copied by the device and then sent back.
|
||||||
"""
|
"""
|
||||||
return generate_action_command(
|
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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,11 @@ from config.definitions import CustomServiceList
|
|||||||
from tmtccmd.config import add_op_code_entry, add_service_op_code_entry
|
from tmtccmd.config import add_op_code_entry, add_service_op_code_entry
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from tmtccmd.tc.packer import TcQueueT
|
||||||
from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT
|
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
|
import gomspace.gomspace_common as gs
|
||||||
from gomspace.gomspace_common import GomspaceOpCodes
|
from gomspace.gomspace_common import GomspaceOpCodes
|
||||||
from gomspace.gomspace_common import Info as GsInfo
|
from gomspace.gomspace_common import Info as GsInfo
|
||||||
@ -47,28 +51,24 @@ def add_acu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
op_code_dict=op_code_dict,
|
op_code_dict=op_code_dict,
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE
|
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
op_code_dict=op_code_dict,
|
op_code_dict=op_code_dict,
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE
|
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
add_op_code_entry(
|
||||||
op_code_dict=op_code_dict,
|
op_code_dict=op_code_dict,
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
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=OpCodes.TEST,
|
|
||||||
info=Info.TEST
|
|
||||||
)
|
)
|
||||||
|
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.TEST, info=Info.TEST)
|
||||||
add_service_op_code_entry(
|
add_service_op_code_entry(
|
||||||
srv_op_code_dict=cmd_dict,
|
srv_op_code_dict=cmd_dict,
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=op_code_dict,
|
||||||
name=CustomServiceList.ACU.value,
|
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"))
|
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Print channel stats"))
|
||||||
command = generate_action_command(
|
command = generate_action_command(
|
||||||
object_id=object_id.as_bytes,
|
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())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
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)
|
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)
|
command = generate_one_diag_command(sid=hk_sid, ssc=0)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
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)
|
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)
|
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
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,
|
P60DockConfigTable.out_en_0.parameter_size,
|
||||||
gs.Channel.off,
|
gs.Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import ServiceOpCodeDictT, add_op_code_entry, add_service_op_code_entry, \
|
from tmtccmd.config import (
|
||||||
OpCodeDictKeys
|
ServiceOpCodeDictT,
|
||||||
|
add_op_code_entry,
|
||||||
|
add_service_op_code_entry,
|
||||||
|
OpCodeDictKeys,
|
||||||
|
)
|
||||||
|
|
||||||
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, Info
|
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, Info
|
||||||
from pus_tc.devs.pdu1 import Pdu1OpCodes
|
from pus_tc.devs.pdu1 import Pdu1OpCodes
|
||||||
@ -291,5 +295,3 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
add_pdu1_cmds(cmd_dict)
|
add_pdu1_cmds(cmd_dict)
|
||||||
add_pdu2_cmds(cmd_dict)
|
add_pdu2_cmds(cmd_dict)
|
||||||
add_acu_cmds(cmd_dict)
|
add_acu_cmds(cmd_dict)
|
||||||
|
|
||||||
|
|
||||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
|||||||
Subproject commit 4fbbf129e140e593b1cc54a0361fa20cc8726789
|
Subproject commit 0e193f9c76973a6105926ed133b179f8ea467981
|
Loading…
Reference in New Issue
Block a user