From 16e48535822a9875b8a60bbfe312a03e4b2a76ad Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 1 Dec 2022 11:18:11 +0100 Subject: [PATCH] some fixes for old proc cmds --- eive_tmtc/tmtc/acs/acs_board.py | 14 +++++++++----- eive_tmtc/tmtc/acs/sus_board.py | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/eive_tmtc/tmtc/acs/acs_board.py b/eive_tmtc/tmtc/acs/acs_board.py index b109294..703b335 100644 --- a/eive_tmtc/tmtc/acs/acs_board.py +++ b/eive_tmtc/tmtc/acs/acs_board.py @@ -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() diff --git a/eive_tmtc/tmtc/acs/sus_board.py b/eive_tmtc/tmtc/acs/sus_board.py index dac1209..735bf50 100644 --- a/eive_tmtc/tmtc/acs/sus_board.py +++ b/eive_tmtc/tmtc/acs/sus_board.py @@ -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()