Compare commits
10 Commits
7f872c92c4
...
v2.17.0
Author | SHA1 | Date | |
---|---|---|---|
bf31810f25 | |||
9462a6e245 | |||
208d328683 | |||
90ea903c0a | |||
2aa1ecd3a7 | |||
f18a7f49cf | |||
a5bfee076a | |||
0c17203825 | |||
beb8e61e2c | |||
e9d10dae1b |
@@ -10,6 +10,13 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v2.17.0] 2023-03-07
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Health set and health announce commands
|
||||||
|
- Camera Switcher, Syrlinks Assembly, IMTQ assembly and Star Tracker assembly object IDs added
|
||||||
|
|
||||||
# [v2.16.4] 2023-03-04
|
# [v2.16.4] 2023-03-04
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
__version__ = "2.16.4"
|
__version__ = "2.17.0"
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
SW_NAME = "eive-tmtc"
|
SW_NAME = "eive-tmtc"
|
||||||
VERSION_MAJOR = 2
|
VERSION_MAJOR = 2
|
||||||
VERSION_MINOR = 16
|
VERSION_MINOR = 17
|
||||||
VERSION_REVISION = 4
|
VERSION_REVISION = 0
|
||||||
|
|
||||||
EIVE_TMTC_ROOT = Path(__file__).parent
|
EIVE_TMTC_ROOT = Path(__file__).parent
|
||||||
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
||||||
|
@@ -136,6 +136,10 @@ ACS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x01])
|
|||||||
SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
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])
|
||||||
|
CAM_SWITCHER = bytes([0x73, 0x00, 0x00, 0x06])
|
||||||
|
SYRLINKS_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x07])
|
||||||
|
IMTQ_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x08])
|
||||||
|
STR_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x09])
|
||||||
|
|
||||||
# Controllers
|
# Controllers
|
||||||
TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
|
TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
|
import struct
|
||||||
|
|
||||||
from eive_tmtc.config.definitions import CustomServiceList
|
from eive_tmtc.config.definitions import CustomServiceList
|
||||||
|
from eive_tmtc.tmtc.obj_prompt import prompt_object
|
||||||
from spacepackets.ecss import PusTelecommand
|
from spacepackets.ecss import PusTelecommand
|
||||||
from tmtccmd.config.tmtc import (
|
from tmtccmd.config.tmtc import (
|
||||||
tmtc_definitions_provider,
|
tmtc_definitions_provider,
|
||||||
@@ -6,7 +9,7 @@ from tmtccmd.config.tmtc import (
|
|||||||
OpCodeEntry,
|
OpCodeEntry,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc import service_provider
|
from tmtccmd.tc import service_provider
|
||||||
from tmtccmd.pus.s201_fsfw_health import Subservice
|
from tmtccmd.pus.s201_fsfw_health import Subservice, FsfwHealth
|
||||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
|
||||||
|
|
||||||
@@ -22,21 +25,42 @@ class Info:
|
|||||||
ANNOUNCE_HEALTH = "Read health state of one object"
|
ANNOUNCE_HEALTH = "Read health state of one object"
|
||||||
|
|
||||||
|
|
||||||
|
def prompt_health() -> FsfwHealth:
|
||||||
|
for item in FsfwHealth:
|
||||||
|
print(f"{item}: {item.name}")
|
||||||
|
health_idx = int(input("Please enter health by index: "))
|
||||||
|
return FsfwHealth(health_idx)
|
||||||
|
|
||||||
|
|
||||||
@service_provider(CustomServiceList.HEALTH)
|
@service_provider(CustomServiceList.HEALTH)
|
||||||
def pack_test_command(p: ServiceProviderParams):
|
def pack_test_command(p: ServiceProviderParams):
|
||||||
o = p.op_code
|
o = p.op_code
|
||||||
q = p.queue_helper
|
q = p.queue_helper
|
||||||
if o == OpCode.SET_HEALTH:
|
if o == OpCode.SET_HEALTH:
|
||||||
raise NotImplementedError
|
app_data = bytearray(prompt_object())
|
||||||
if o == OpCode.ANNOUNCE_HEALTH:
|
health = prompt_health()
|
||||||
raise NotImplementedError
|
app_data.append(health)
|
||||||
|
q.add_log_cmd(Info.SET_HEALTH)
|
||||||
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
|
service=201, subservice=Subservice.TC_SET_HEALTH, app_data=app_data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
elif o == OpCode.ANNOUNCE_HEALTH:
|
||||||
|
app_data = bytearray(prompt_object())
|
||||||
|
q.add_log_cmd(Info.ANNOUNCE_HEALTH)
|
||||||
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
|
service=201, subservice=Subservice.TC_ANNOUNCE_HEALTH, app_data=app_data
|
||||||
|
)
|
||||||
|
)
|
||||||
elif o == OpCode.ANNOUNCE_HEALTH_ALL:
|
elif o == OpCode.ANNOUNCE_HEALTH_ALL:
|
||||||
q.add_log_cmd(Info.ANNOUNCE_HEALTH_ALL)
|
q.add_log_cmd(Info.ANNOUNCE_HEALTH_ALL)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
PusTelecommand(service=201, subservice=Subservice.TC_ANNOUNCE_HEALTH_ALL)
|
PusTelecommand(service=201, subservice=Subservice.TC_ANNOUNCE_HEALTH_ALL)
|
||||||
)
|
)
|
||||||
return
|
else:
|
||||||
raise ValueError(f"unknown op code {o} for service {CustomServiceList.HEALTH}")
|
raise ValueError(f"unknown op code {o} for service {CustomServiceList.HEALTH}")
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
|
@@ -2,9 +2,11 @@ from eive_tmtc.config.object_ids import (
|
|||||||
ACS_SUBSYSTEM_ID,
|
ACS_SUBSYSTEM_ID,
|
||||||
ACS_CONTROLLER,
|
ACS_CONTROLLER,
|
||||||
IMTQ_HANDLER_ID,
|
IMTQ_HANDLER_ID,
|
||||||
|
GYRO_0_ADIS_HANDLER_ID,
|
||||||
|
GYRO_1_L3G_HANDLER_ID,
|
||||||
ACS_BOARD_ASS_ID,
|
ACS_BOARD_ASS_ID,
|
||||||
RW_ASSEMBLY,
|
RW_ASSEMBLY,
|
||||||
SUS_BOARD_ASS_ID
|
SUS_BOARD_ASS_ID,
|
||||||
)
|
)
|
||||||
|
|
||||||
SUBSYSTEM_DICT = {
|
SUBSYSTEM_DICT = {
|
||||||
@@ -19,17 +21,20 @@ ACS_OBJ_DICT = {
|
|||||||
2: ("ACS Board Assembly", ACS_BOARD_ASS_ID),
|
2: ("ACS Board Assembly", ACS_BOARD_ASS_ID),
|
||||||
3: ("RW Assembly", RW_ASSEMBLY),
|
3: ("RW Assembly", RW_ASSEMBLY),
|
||||||
4: ("iMTQ MGT", IMTQ_HANDLER_ID),
|
4: ("iMTQ MGT", IMTQ_HANDLER_ID),
|
||||||
|
5: ("GYR 0 ADIS", GYRO_0_ADIS_HANDLER_ID),
|
||||||
|
6: ("GYR 1 L3G", GYRO_1_L3G_HANDLER_ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def prompt_object() -> bytes:
|
def prompt_object() -> bytes:
|
||||||
for k, v in SUBSYSTEM_DICT:
|
for k, v in SUBSYSTEM_DICT.items():
|
||||||
print(f"{k}: {v}")
|
print(f"{k}: {v}")
|
||||||
subsystem_key = int(input("Please specify target subsystem by key: "))
|
subsystem_key = int(input("Please specify target subsystem by key: "))
|
||||||
subsystem = SUBSYSTEM_DICT[subsystem_key]
|
subsystem = SUBSYSTEM_DICT[subsystem_key]
|
||||||
if subsystem is None:
|
if subsystem is None:
|
||||||
raise ValueError("invalid key")
|
raise ValueError("invalid key")
|
||||||
if subsystem == "acs":
|
if subsystem == "acs":
|
||||||
for k, v in ACS_OBJ_DICT:
|
for k, v in ACS_OBJ_DICT.items():
|
||||||
print(f"{k}: {v[0]}")
|
print(f"{k}: {v[0]}")
|
||||||
obj_key = int(input("Please specify target object by key: "))
|
obj_key = int(input("Please specify target object by key: "))
|
||||||
acs_obj = ACS_OBJ_DICT[obj_key]
|
acs_obj = ACS_OBJ_DICT[obj_key]
|
||||||
|
@@ -40,7 +40,7 @@ class Tmp1075ActionId(enum.IntEnum):
|
|||||||
|
|
||||||
|
|
||||||
class SetId:
|
class SetId:
|
||||||
TMEPERATURE = 1
|
TEMPERATURE = 1
|
||||||
|
|
||||||
|
|
||||||
def pack_tmp1075_test_into(
|
def pack_tmp1075_test_into(
|
||||||
@@ -64,7 +64,7 @@ def pack_tmp1075_test_into(
|
|||||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||||
if op_code == OpCode.HK:
|
if op_code == OpCode.HK:
|
||||||
q.add_log_cmd("TMP1075: Request One-Shot HK")
|
q.add_log_cmd("TMP1075: Request One-Shot HK")
|
||||||
q.add_pus_tc(create_request_one_hk_command(make_sid(obyt, SetId.TMEPERATURE)))
|
q.add_pus_tc(create_request_one_hk_command(make_sid(obyt, SetId.TEMPERATURE)))
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user