more cleaning
All checks were successful
EIVE/-/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-10-27 12:28:55 +02:00
parent 4e56bd172e
commit b08f9d9af6
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -116,6 +116,7 @@ class OpCodes:
READ_SECONDARY_TM_SET = "read_secondary_tm"
TAKE_IMAGE = "take_image"
UPLOAD_IMAGE = "upload_image"
DOWNLOAD_IMAGE = "download_image"
SET_IMG_PROCESSOR_MODE = "set_img_proc_mode"
FW_UPDATE = "fw_update"
SET_TIME_FROM_SYS_TIME = "set_time"
@ -128,7 +129,8 @@ class Info:
ADD_SECONDARY_TM_TO_NORMAL_MODE = "Add specific Dataset to secondary TM"
RESET_SECONDARY_TM_SET = "Reset secondary TM to Temperature Set only"
READ_SECONDARY_TM_SET = "Read list of secondary TM Sets"
UPLOAD_IMAGE = "Upload Image"
UPLOAD_IMAGE = "Upload Optical Image"
DOWNLOAD_IMAGE = "Download Optical Image"
TAKE_IMAGE = "Take Image"
SET_IMG_PROCESSOR_MODE = "Set Image Processor Mode"
FW_UPDATE = "Firmware Update"
@ -323,8 +325,8 @@ def pack_star_tracker_commands( # noqa C901
+ bytearray(image, "utf-8")
)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "16":
q.add_log_cmd("Star tracker: Download image")
if op_code == OpCodes.DOWNLOAD_IMAGE:
q.add_log_cmd(f"STR: {Info.DOWNLOAD_IMAGE}")
path = input("Specify storage location (default - /mnt/sd0/startracker): ")
if not path:
path = FileDefs.download_path
@ -1154,63 +1156,17 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCodes.OFF, "Mode Off")
oce.add(OpCodes.PING, "Star Tracker: Ping")
oce.add(OpCodes.TAKE_IMAGE, "Take Image")
oce.add(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE)
oce.add(OpCodes.DOWNLOAD_IMAGE, Info.DOWNLOAD_IMAGE)
oce.add(OpCodes.ONE_SHOOT_HK, Info.ONE_SHOOT_HK)
oce.add(OpCodes.ENABLE_HK, Info.ENABLE_HK)
oce.add(OpCodes.DISABLE_HK, Info.DISABLE_HK)
oce.add(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE)
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("7", "Star Tracker: Request temperature")
# oce.add("8", "Star Tracker: Request version")
# oce.add("9", "Star Tracker: Request interface")
# oce.add("10", "Star Tracker: Request power")
# oce.add("11", "Star Tracker: Set subscription parameters")
# oce.add("12", "Star Tracker: Boot image (requires bootloader mode)")
# oce.add("13", "Star Tracker: Request time")
# oce.add("14", "Star Tracker: Request solution")
# oce.add("16", "Star Tracker: Download image")
# oce.add("17", "Star Tracker: Set limit parameters")
# oce.add("17", "Star Tracker: Set limit parameters")
# oce.add("18", "Star Tracker: Set tracking parameters")
# oce.add("19", "Star Tracker: Set mounting parameters")
# oce.add("20", "Star Tracker: Set camera parameters")
# oce.add("22", "Star Tracker: Set centroiding parameters")
# oce.add("23", "Star Tracker: Set LISA parameters")
# oce.add("24", "Star Tracker: Set matching parameters")
# oce.add("25", "Star Tracker: Set validation parameters")
# oce.add("26", "Star Tracker: Set algo parameters")
# oce.add("28", "Star Tracker: Stop str helper")
# oce.add("30", "Star Tracker: Set name of download image")
# oce.add("31", "Star Tracker: Request histogram")
# oce.add("32", "Star Tracker: Request contrast")
# oce.add("33", "Star Tracker: Set json filename")
# oce.add("35", "Star Tracker: Flash read")
# oce.add("36", "Star Tracker: Set flash read filename")
# oce.add("37", "Star Tracker: Get checksum")
# oce.add("49", "Star Tracker: Request camera parameter")
# oce.add("50", "Star Tracker: Request limits")
# oce.add("52", "Star Tracker: (EGSE only) Load camera ground config")
# oce.add("53", "Star Tracker: (EGSE only) Load camera flight config")
# oce.add("54", "Star Tracker: Request log level parameters")
# oce.add("55", "Star Tracker: Request mounting parameters")
# oce.add("56", "Star Tracker: Request image processor parameters")
# oce.add("57", "Star Tracker: Request centroiding parameters")
# oce.add("58", "Star Tracker: Request lisa parameters")
# oce.add("59", "Star Tracker: Request matching parameters")
# oce.add("60", "Star Tracker: Request tracking parameters")
# oce.add("61", "Star Tracker: Request validation parameters")
# oce.add("62", "Star Tracker: Request algo parameters")
# oce.add("63", "Star Tracker: Request subscription parameters")
# oce.add("64", "Star Tracker: Request log subscription parameters")
# oce.add("65", "Star Tracker: Request debug camera parameters")
# oce.add("66", "Star Tracker: Set log level parameters")
# oce.add("67", "Star Tracker: Set log subscription parameters")
# oce.add("68", "Star Tracker: Set debug camera parameters")
oce.add(OpCodes.FW_UPDATE, Info.FW_UPDATE)
oce.add(OpCodes.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)