2023-03-06 12:03:51 +01:00
|
|
|
from eive_tmtc.config.object_ids import (
|
|
|
|
ACS_SUBSYSTEM_ID,
|
|
|
|
ACS_CONTROLLER,
|
|
|
|
IMTQ_HANDLER_ID,
|
2023-03-06 14:25:04 +01:00
|
|
|
GYRO_0_ADIS_HANDLER_ID,
|
|
|
|
GYRO_1_L3G_HANDLER_ID,
|
2023-03-06 12:03:51 +01:00
|
|
|
ACS_BOARD_ASS_ID,
|
|
|
|
RW_ASSEMBLY,
|
2023-03-06 13:09:28 +01:00
|
|
|
SUS_BOARD_ASS_ID,
|
2023-03-24 17:25:10 +01:00
|
|
|
MGM_0_LIS3_HANDLER_ID,
|
|
|
|
MGM_1_RM3100_HANDLER_ID
|
2023-03-06 12:03:51 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
SUBSYSTEM_DICT = {
|
|
|
|
0: "acs",
|
|
|
|
1: "tcs",
|
|
|
|
2: "com",
|
|
|
|
}
|
|
|
|
|
|
|
|
ACS_OBJ_DICT = {
|
|
|
|
0: ("Subsystem", ACS_SUBSYSTEM_ID),
|
|
|
|
1: ("SUS Assembly", SUS_BOARD_ASS_ID),
|
|
|
|
2: ("ACS Board Assembly", ACS_BOARD_ASS_ID),
|
|
|
|
3: ("RW Assembly", RW_ASSEMBLY),
|
|
|
|
4: ("iMTQ MGT", IMTQ_HANDLER_ID),
|
2023-03-06 14:25:04 +01:00
|
|
|
5: ("GYR 0 ADIS", GYRO_0_ADIS_HANDLER_ID),
|
2023-03-07 10:11:11 +01:00
|
|
|
6: ("GYR 1 L3G", GYRO_1_L3G_HANDLER_ID),
|
2023-03-24 17:25:10 +01:00
|
|
|
7: ("MGM 0 LIS3", MGM_0_LIS3_HANDLER_ID),
|
|
|
|
8: ("MGM 1 RM3100", MGM_1_RM3100_HANDLER_ID)
|
2023-03-06 12:03:51 +01:00
|
|
|
}
|
|
|
|
|
2023-03-06 13:09:28 +01:00
|
|
|
|
2023-03-06 12:03:51 +01:00
|
|
|
def prompt_object() -> bytes:
|
2023-03-06 13:58:52 +01:00
|
|
|
for k, v in SUBSYSTEM_DICT.items():
|
2023-03-06 12:03:51 +01:00
|
|
|
print(f"{k}: {v}")
|
|
|
|
subsystem_key = int(input("Please specify target subsystem by key: "))
|
|
|
|
subsystem = SUBSYSTEM_DICT[subsystem_key]
|
|
|
|
if subsystem is None:
|
|
|
|
raise ValueError("invalid key")
|
|
|
|
if subsystem == "acs":
|
2023-03-06 13:58:52 +01:00
|
|
|
for k, v in ACS_OBJ_DICT.items():
|
2023-03-06 12:03:51 +01:00
|
|
|
print(f"{k}: {v[0]}")
|
|
|
|
obj_key = int(input("Please specify target object by key: "))
|
|
|
|
acs_obj = ACS_OBJ_DICT[obj_key]
|
|
|
|
if acs_obj is None:
|
|
|
|
raise ValueError("invalid key")
|
|
|
|
return acs_obj[1]
|