some fixes for old proc cmds

This commit is contained in:
Robin Müller 2022-12-01 11:18:11 +01:00
parent 140c827ce7
commit 16e4853582
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 18 additions and 10 deletions

View File

@ -6,7 +6,7 @@ from tmtccmd.config.tmtc import (
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc import service_provider
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from eive_tmtc.config.object_ids import ACS_BOARD_ASS_ID
@ -30,10 +30,7 @@ class DualSideSubmodes(enum.IntEnum):
DUAL_SIDE = 2
@service_provider(CustomServiceList.ACS_BRD_ASS)
def pack_acs_command(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
def pack_acs_command(q: DefaultPusQueueHelper, op_code: str):
if op_code in AcsOpCodes.ACS_ASS_A_SIDE:
pack_mode_cmd_with_info(
object_id=ACS_BOARD_ASS_ID,
@ -92,6 +89,13 @@ def pack_acs_command(p: ServiceProviderParams):
)
@service_provider(CustomServiceList.ACS_BRD_ASS)
def pack_acs_command_provider(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
pack_acs_command(q, op_code)
@tmtc_definitions_provider
def add_acs_board_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()

View File

@ -7,7 +7,7 @@ from tmtccmd.config.tmtc import (
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc import service_provider
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_modes import Modes
@ -19,10 +19,7 @@ class SusOpCodes:
SUS_ASS_OFF = ["3", "off"]
@service_provider(CustomServiceList.SUS_BRD_ASS)
def pack_sus_cmds(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
def pack_sus_cmds(q: DefaultPusQueueHelper, op_code: str):
if op_code in SusOpCodes.SUS_ASS_NOM_SIDE:
pack_mode_cmd_with_info(
object_id=SUS_BOARD_ASS_ID,
@ -57,6 +54,13 @@ def pack_sus_cmds(p: ServiceProviderParams):
)
@service_provider(CustomServiceList.SUS_BRD_ASS)
def pack_sus_cmds_prvoider(p: ServiceProviderParams):
op_code = p.op_code
q = p.queue_helper
pack_sus_cmds(q, op_code)
@tmtc_definitions_provider
def add_sus_board_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()