update tmtc
This commit is contained in:
@ -1,18 +1,46 @@
|
||||
from gomspace.gomspace_common import GsInfo
|
||||
from pus_tc.devs.common_power import (
|
||||
PowerOpCodes,
|
||||
Pdu1InfoBase,
|
||||
Pdu2InfoBase,
|
||||
add_pdu1_common_defs,
|
||||
add_pdu2_common_defs,
|
||||
PowerInfo,
|
||||
pdu1_cmds,
|
||||
pdu2_cmds,
|
||||
pdu1_req_hk_cmds,
|
||||
pdu2_req_hk_cmds,
|
||||
)
|
||||
from config.definitions import CustomServiceList
|
||||
from tmtccmd import get_console_logger
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
|
||||
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, P60Info
|
||||
from pus_tc.devs.acu import add_acu_cmds
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||
pdu1_cmds(q, op_code)
|
||||
pdu2_cmds(q, op_code)
|
||||
if op_code in PowerOpCodes.INFO_CORE:
|
||||
pdu1_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)
|
||||
elif op_code in PowerOpCodes.INFO_AUX:
|
||||
pdu1_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)
|
||||
elif op_code in PowerOpCodes.INFO_ALL:
|
||||
pdu1_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])
|
||||
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||
q.add_wait_seconds(3.0)
|
||||
if q.empty():
|
||||
LOGGER.info(f"Queue is empty, no stack for op code {op_code}")
|
||||
|
||||
|
||||
@tmtc_definitions_provider
|
||||
|
Reference in New Issue
Block a user