add controller obj IDs

This commit is contained in:
Robin Müller 2022-08-11 19:12:27 +02:00
parent 65414bc87f
commit 1a27ea9674
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 18 additions and 4 deletions

View File

@ -15,7 +15,6 @@ __OBJECT_ID_DICT = None
# Core Object IDs
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
# Power Object IDs
@ -128,6 +127,11 @@ SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
# Controllers
TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
ACS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x02])
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
def get_object_ids() -> ObjectIdDictT:
global __OBJECT_ID_DICT

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,

View File

@ -8,14 +8,18 @@ from config.object_ids import TCS_BOARD_ASS_ID
class OpCodes:
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
REQUEST_ALL_TEMP_HK = ["temp-hk"]
class Info:
REQUEST_ALL_TEMP_SET = "Request HK set of all temperatures"
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
if op_code in OpCodes.REQUEST_ALL_TEMP_HK:
pass
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
command_mode(
object_id=TCS_BOARD_ASS_ID,