continued update to new API
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import enum
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
|
||||
from tmtccmd.tc import QueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||
from config.object_ids import ACS_BOARD_ASS_ID, SUS_BOARD_ASS_ID
|
||||
|
||||
@ -29,13 +30,13 @@ class DualSideSubmodes(enum.IntEnum):
|
||||
DUAL_SIDE = 2
|
||||
|
||||
|
||||
def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
def pack_acs_command(q: QueueHelper, op_code: str):
|
||||
if op_code in AcsOpCodes.ACS_ASS_A_SIDE:
|
||||
command_mode(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly A side",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_B_SIDE:
|
||||
@ -43,7 +44,7 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly B side",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_DUAL_MODE:
|
||||
@ -51,7 +52,7 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.DUAL_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly dual mode",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_A_ON:
|
||||
@ -59,7 +60,7 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching ACS board assembly A side on",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_B_ON:
|
||||
@ -67,7 +68,7 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching ACS board assembly B side on",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_DUAL_ON:
|
||||
@ -75,7 +76,7 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.ON,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching ACS board assembly dual side on",
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_OFF:
|
||||
@ -83,18 +84,18 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.OFF,
|
||||
submode=0,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to ACS board assembly off",
|
||||
)
|
||||
|
||||
|
||||
def pack_sus_cmds(tc_queue: TcQueueT, op_code: str):
|
||||
def pack_sus_cmds(q: QueueHelper, op_code: str):
|
||||
if op_code in SusOpCodes.SUS_ASS_NOM_SIDE:
|
||||
command_mode(
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.A_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to SUS board to nominal side",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_RED_SIDE:
|
||||
@ -102,7 +103,7 @@ def pack_sus_cmds(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.B_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to SUS board to redundant side",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_OFF:
|
||||
@ -110,7 +111,7 @@ def pack_sus_cmds(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.OFF,
|
||||
submode=0,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching SUS board off",
|
||||
)
|
||||
if op_code in SusOpCodes.SUS_ASS_DUAL_MODE:
|
||||
@ -118,6 +119,6 @@ def pack_sus_cmds(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=SUS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=DualSideSubmodes.DUAL_SIDE,
|
||||
tc_queue=tc_queue,
|
||||
q=q,
|
||||
info="Switching to SUS board to dual side",
|
||||
)
|
||||
|
Reference in New Issue
Block a user