add controller obj IDs

This commit is contained in:
2022-08-11 19:12:27 +02:00
parent 65414bc87f
commit 1a27ea9674
3 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,8 @@
from typing import Union
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.util import ObjectIdU32
from tmtccmd.util import ObjectIdU32, ObjectIdBase
from .common import command_mode
import config.object_ids as obj_ids
@ -43,7 +45,9 @@ def pack_cmd_ctrl_to_prompted_mode(
)
def pack_cmd_ctrl_to_off(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
def pack_cmd_ctrl_to_off(
q: DefaultPusQueueHelper, object_id: Union[ObjectIdBase, ObjectIdU32]
):
command_mode(
object_id=object_id.as_bytes,
mode=Modes.OFF,
@ -63,7 +67,9 @@ def pack_cmd_ctrl_to_on(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
)
def pack_cmd_ctrl_to_nml(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
def pack_cmd_ctrl_to_nml(
q: DefaultPusQueueHelper, object_id: Union[ObjectIdBase, ObjectIdU32]
):
command_mode(
object_id=object_id.as_bytes,
mode=Modes.NORMAL,