add controller obj IDs
This commit is contained in:
parent
65414bc87f
commit
1a27ea9674
@ -15,7 +15,6 @@ __OBJECT_ID_DICT = None
|
|||||||
|
|
||||||
|
|
||||||
# Core Object IDs
|
# Core Object IDs
|
||||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
||||||
|
|
||||||
# Power Object IDs
|
# 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])
|
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
||||||
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
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:
|
def get_object_ids() -> ObjectIdDictT:
|
||||||
global __OBJECT_ID_DICT
|
global __OBJECT_ID_DICT
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
from typing import Union
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
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
|
from .common import command_mode
|
||||||
import config.object_ids as obj_ids
|
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(
|
command_mode(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
mode=Modes.OFF,
|
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(
|
command_mode(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
|
@ -8,14 +8,18 @@ from config.object_ids import TCS_BOARD_ASS_ID
|
|||||||
class OpCodes:
|
class OpCodes:
|
||||||
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
|
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
|
||||||
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
|
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
|
||||||
|
REQUEST_ALL_TEMP_HK = ["temp-hk"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
|
REQUEST_ALL_TEMP_SET = "Request HK set of all temperatures"
|
||||||
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
|
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
|
||||||
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
|
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
|
||||||
|
|
||||||
|
|
||||||
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
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:
|
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
||||||
command_mode(
|
command_mode(
|
||||||
object_id=TCS_BOARD_ASS_ID,
|
object_id=TCS_BOARD_ASS_ID,
|
||||||
|
Loading…
Reference in New Issue
Block a user