STR start adding some missing cmds
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
This commit is contained in:
parent
f52f4b1ce2
commit
e18ec86eca
@ -266,10 +266,19 @@ def pack_star_tracker_commands( # noqa C901
|
|||||||
if op_code == OpCodes.DISABLE_HK:
|
if op_code == OpCodes.DISABLE_HK:
|
||||||
q.add_log_cmd(Info.DISABLE_HK)
|
q.add_log_cmd(Info.DISABLE_HK)
|
||||||
request_dataset(q, DataSetRequest.DISABLE)
|
request_dataset(q, DataSetRequest.DISABLE)
|
||||||
if op_code == OpCodes.REQUEST_SOLUTION_SET_ACTION:
|
if op_code == OpCodes.ADD_SECONDARY_TM_TO_NORMAL_MODE:
|
||||||
q.add_log_cmd("Star tracker: Request solution")
|
q.add_log_cmd(Info.ADD_SECONDARY_TM_TO_NORMAL_MODE)
|
||||||
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_SOLUTION)
|
add_secondary_tm_to_normal_mode_tc()
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
if op_code == OpCodes.READ_SECONDARY_TM_SET:
|
||||||
|
q.add_log_cmd(Info.READ_SECONDARY_TM_SET)
|
||||||
|
add_read_secondary_tm_set_tc()
|
||||||
|
if op_code == OpCodes.RESET_SECONDARY_TM_SET:
|
||||||
|
q.add_log_cmd(Info.RESET_SECONDARY_TM_SET)
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
STAR_TRACKER_ID, StarTrackerActionId.RESET_SECONDARY_TM_SET
|
||||||
|
)
|
||||||
|
)
|
||||||
if op_code == "4":
|
if op_code == "4":
|
||||||
q.add_log_cmd("Star tracker: Mode Raw")
|
q.add_log_cmd("Star tracker: Mode Raw")
|
||||||
data = pack_mode_data(obyt, Mode.RAW, 0)
|
data = pack_mode_data(obyt, Mode.RAW, 0)
|
||||||
@ -1073,13 +1082,13 @@ def handle_read_secondary_tm_set(pw: PrintWrapper, custom_data: bytes):
|
|||||||
pw.dlog("Received secondary TM Sets")
|
pw.dlog("Received secondary TM Sets")
|
||||||
data_length = len(custom_data)
|
data_length = len(custom_data)
|
||||||
if data_length < 1: # lul
|
if data_length < 1: # lul
|
||||||
raise ValueError(f"Received data shorter than expected")
|
raise ValueError("Received data shorter than expected")
|
||||||
fmt_str = "!B" * data_length
|
fmt_str = "!B" * data_length
|
||||||
inc_len = struct.calcsize(fmt_str)
|
inc_len = struct.calcsize(fmt_str)
|
||||||
setIds = struct.unpack(fmt_str, custom_data[:inc_len])
|
set_ids = struct.unpack(fmt_str, custom_data[:inc_len])
|
||||||
pw.dlog("The following Datasets are currently Part of the secondary TM list")
|
pw.dlog("The following Datasets are currently Part of the secondary TM list")
|
||||||
for setId in setIds:
|
for set_id in set_ids:
|
||||||
pw.dlog(SetId[setId].name)
|
pw.dlog(SetId(set_id).name)
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
@ -1089,7 +1098,6 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(OpCodes.ON_FIRMWARE, "Mode On, Submode Firmware")
|
oce.add(OpCodes.ON_FIRMWARE, "Mode On, Submode Firmware")
|
||||||
oce.add(OpCodes.NORMAL, "Mode Normal")
|
oce.add(OpCodes.NORMAL, "Mode Normal")
|
||||||
oce.add(OpCodes.OFF, "Mode Off")
|
oce.add(OpCodes.OFF, "Mode Off")
|
||||||
# oce.add("4", "Star Tracker: Mode Raw")
|
|
||||||
oce.add(OpCodes.PING, "Star Tracker: Ping")
|
oce.add(OpCodes.PING, "Star Tracker: Ping")
|
||||||
oce.add(OpCodes.TAKE_IMAGE, "Take Image")
|
oce.add(OpCodes.TAKE_IMAGE, "Take Image")
|
||||||
oce.add(OpCodes.ONE_SHOOT_HK, Info.ONE_SHOOT_HK)
|
oce.add(OpCodes.ONE_SHOOT_HK, Info.ONE_SHOOT_HK)
|
||||||
@ -1097,6 +1105,11 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(OpCodes.DISABLE_HK, Info.DISABLE_HK)
|
oce.add(OpCodes.DISABLE_HK, Info.DISABLE_HK)
|
||||||
oce.add(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE)
|
oce.add(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE)
|
||||||
oce.add(OpCodes.SET_IMG_PROCESSOR_MODE, Info.SET_IMG_PROCESSOR_MODE)
|
oce.add(OpCodes.SET_IMG_PROCESSOR_MODE, Info.SET_IMG_PROCESSOR_MODE)
|
||||||
|
oce.add(
|
||||||
|
OpCodes.ADD_SECONDARY_TM_TO_NORMAL_MODE, Info.ADD_SECONDARY_TM_TO_NORMAL_MODE
|
||||||
|
)
|
||||||
|
oce.add(OpCodes.READ_SECONDARY_TM_SET, Info.READ_SECONDARY_TM_SET)
|
||||||
|
oce.add(OpCodes.RESET_SECONDARY_TM_SET, Info.RESET_SECONDARY_TM_SET)
|
||||||
# oce.add("6", "Star Tracker: Switch to bootloader program")
|
# oce.add("6", "Star Tracker: Switch to bootloader program")
|
||||||
# oce.add("7", "Star Tracker: Request temperature")
|
# oce.add("7", "Star Tracker: Request temperature")
|
||||||
# oce.add("8", "Star Tracker: Request version")
|
# oce.add("8", "Star Tracker: Request version")
|
||||||
@ -1145,7 +1158,5 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
# oce.add("67", "Star Tracker: Set log subscription parameters")
|
# oce.add("67", "Star Tracker: Set log subscription parameters")
|
||||||
# oce.add("68", "Star Tracker: Set debug camera parameters")
|
# oce.add("68", "Star Tracker: Set debug camera parameters")
|
||||||
oce.add(OpCodes.FW_UPDATE, Info.FW_UPDATE)
|
oce.add(OpCodes.FW_UPDATE, Info.FW_UPDATE)
|
||||||
# oce.add("70", "Star Tracker: Disable timestamp generation")
|
|
||||||
# oce.add("71", "Star Tracker: Enable timestamp generation")
|
|
||||||
oce.add(OpCodes.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
|
oce.add(OpCodes.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
|
||||||
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
||||||
|
Loading…
Reference in New Issue
Block a user