extend power commands
This commit is contained in:
parent
e402b456bf
commit
729e945013
@ -64,8 +64,8 @@ class PowerOpCodes:
|
|||||||
PL_CAM_OFF = ["cam-off"]
|
PL_CAM_OFF = ["cam-off"]
|
||||||
|
|
||||||
INFO_CORE = ["info"]
|
INFO_CORE = ["info"]
|
||||||
INFO_AUX = ["info-aux"]
|
INFO_AUX = ["info_aux"]
|
||||||
INFO_ALL = ["info-all"]
|
INFO_ALL = ["info_all"]
|
||||||
|
|
||||||
|
|
||||||
def add_gomspace_cmds(
|
def add_gomspace_cmds(
|
||||||
|
@ -10,8 +10,8 @@ from tmtc.power.pdu2 import pdu2_req_hk_cmds, add_pdu2_common_defs, pdu2_cmds
|
|||||||
from tmtccmd import get_console_logger
|
from tmtccmd import get_console_logger
|
||||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
|
||||||
from tmtc.power.p60dock import P60OpCodes, P60Info
|
from tmtc.power.p60dock import P60OpCodes, P60Info, p60_dock_req_hk_cmds
|
||||||
from tmtc.power.acu import add_acu_cmds
|
from tmtc.power.acu import add_acu_cmds, acu_req_hk_cmds
|
||||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
|
||||||
@ -25,17 +25,25 @@ def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
if op_code in PowerOpCodes.INFO_CORE:
|
if op_code in PowerOpCodes.INFO_CORE:
|
||||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
q.add_wait_seconds(3.0)
|
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(8.0)
|
||||||
elif op_code in PowerOpCodes.INFO_AUX:
|
elif op_code in PowerOpCodes.INFO_AUX:
|
||||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
q.add_wait_seconds(3.0)
|
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(8.0)
|
||||||
elif op_code in PowerOpCodes.INFO_ALL:
|
elif op_code in PowerOpCodes.INFO_ALL:
|
||||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
q.add_wait_seconds(3.0)
|
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
p60_dock_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
acu_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(8.0)
|
||||||
if q.empty():
|
if q.empty():
|
||||||
LOGGER.info(f"Queue is empty, no stack for op code {op_code}")
|
LOGGER.info(f"Queue is empty, no stack for op code {op_code}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user