fixed conflicts

This commit is contained in:
2022-02-24 10:29:04 +01:00
17 changed files with 1082 additions and 502 deletions

56
pus_tc/bpx_batt.py Normal file
View File

@ -0,0 +1,56 @@
from tmtccmd.tc.definitions import TcQueueT, QueueCommands
from config.object_ids import BPX_HANDLER_ID
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
class BpxSetIds:
GET_HK_SET = 0
GET_CFG_SET = 5
class BpxActionIds:
REBOOT = 2
RESET_COUNTERS = 3
SET_CFG = 4
GET_CFG = 5
class BpxOpCodes:
HK = ["0", "hk"]
RST_BOOT_CNT = ["1", "rst_boot_cnt"]
REQUEST_CFG = ["2", "cfg"]
REQUEST_CFG_HK = ["3", "cfg_hk"]
REBOOT = ["4", "reboot"]
def pack_bpx_commands(tc_queue: TcQueueT, op_code: str):
if op_code in BpxOpCodes.HK:
tc_queue.appendleft((QueueCommands.PRINT, "Requesting BPX battery HK set"))
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_HK_SET)
cmd = generate_one_hk_command(sid=sid, ssc=0)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in BpxOpCodes.RST_BOOT_CNT:
tc_queue.appendleft((QueueCommands.PRINT, "Resetting reboot counters"))
cmd = generate_action_command(
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS
)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in BpxOpCodes.REQUEST_CFG:
tc_queue.appendleft((QueueCommands.PRINT, "Requesting configuration struct"))
cmd = generate_action_command(
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG
)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in BpxOpCodes.REQUEST_CFG_HK:
tc_queue.appendleft((QueueCommands.PRINT, "Requesting configuration struct HK"))
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_CFG_SET)
cmd = generate_one_hk_command(sid=sid, ssc=0)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in BpxOpCodes.REBOOT:
tc_queue.appendleft((QueueCommands.PRINT, "Rebooting BPX battery"))
cmd = generate_action_command(
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT
)
tc_queue.appendleft(cmd.pack_command_tuple())
pass

View File

@ -14,16 +14,22 @@ from spacepackets.ecss.tc import PusTelecommand
class CommandIds:
# Configures input rate of syrlinks to 400 Khz (results in downlink rate of 200 kbps)
SET_LOW_RATE = bytearray([0x0, 0x0, 0x0, 0x0])
SET_LOW_RATE = 0
# Configures input rate of syrlinks to 2000 Khz (results in downlink rate of 1000 kbps)
SET_HIGH_RATE = bytearray([0x0, 0x0, 0x0, 0x1])
SET_HIGH_RATE = 1
# Enables the syrlinks transmitter (by using RS485 enables lines)
EN_TRANSMITTER = bytearray([0x0, 0x0, 0x0, 0x2])
EN_TRANSMITTER = 2
# Disables the syrlinks transmitter (by using RS485 enables lines)
DIS_TRANSMITTER = bytearray([0x0, 0x0, 0x0, 0x3])
DIS_TRANSMITTER = 3
# Sets an arbitrary bitrate. Normally only set low and set high rate commands should be
# required
ARBITRARY_BITRATE = bytearray([0x0, 0x0, 0x0, 0x4])
ARBITRARY_BITRATE = 4
ENABLE_TX_CLK_MANIPULATOR = 5
DISABLE_TX_CLK_MANIPULATOR = 6
# Tx data will be updated on rising edge of tx clock
UPDATE_ON_RISING_EDGE = 7
# Tx data will be updated on falling edge of tx clock
UPDATE_ON_FALLING_EDGE = 8
def pack_ccsds_handler_test(
@ -37,26 +43,26 @@ def pack_ccsds_handler_test(
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set low rate"))
command = object_id + CommandIds.SET_LOW_RATE
command = object_id + struct.pack("!I", CommandIds.SET_LOW_RATE)
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set high rate"))
command = object_id + CommandIds.SET_HIGH_RATE
command = object_id + struct.pack("!I", CommandIds.SET_HIGH_RATE)
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft(
(QueueCommands.PRINT, "CCSDS Handler: Enables the transmitter")
)
command = object_id + CommandIds.EN_TRANSMITTER
command = object_id + struct.pack("!I", CommandIds.EN_TRANSMITTER)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft(
(QueueCommands.PRINT, "CCSDS Handler: Disables the transmitter")
)
command = object_id + CommandIds.DIS_TRANSMITTER
command = object_id + struct.pack("!I", CommandIds.DIS_TRANSMITTER)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
@ -64,7 +70,45 @@ def pack_ccsds_handler_test(
(QueueCommands.PRINT, "CCSDS Handler: Set arbitrary bitrate")
)
bitrate = int(input("Specify bit rate (bps): "))
command = object_id + CommandIds.ARBITRARY_BITRATE + struct.pack("!I", bitrate)
command = (
object_id
+ struct.pack("!I", CommandIds.ARBITRARY_BITRATE)
+ struct.pack("!I", bitrate)
)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "5":
tc_queue.appendleft(
(QueueCommands.PRINT, "CCSDS Handler: Enable tx clock manipulator")
)
command = object_id + struct.pack("!I", CommandIds.ENABLE_TX_CLK_MANIPULATOR)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "6":
tc_queue.appendleft(
(QueueCommands.PRINT, "CCSDS Handler: Disable tx clock manipulator")
)
command = object_id + struct.pack("!I", CommandIds.DISABLE_TX_CLK_MANIPULATOR)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "7":
tc_queue.appendleft(
(
QueueCommands.PRINT,
"CCSDS Handler: Update tx data on rising edge of tx clock",
)
)
command = object_id + struct.pack("!I", CommandIds.UPDATE_ON_RISING_EDGE)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "8":
tc_queue.appendleft(
(
QueueCommands.PRINT,
"CCSDS Handler: Update tx data on falling edge of tx clock",
)
)
command = object_id + struct.pack("!I", CommandIds.UPDATE_ON_FALLING_EDGE)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())

View File

@ -27,6 +27,9 @@ class Pdu1OpCodes(enum.Enum):
SYRLINKS_OFF = "10"
MGT_ON = "11"
MGT_OFF = "12"
# Solar Cell Experiment
SCEX_ON = "13"
SCEX_OFF = "14"
class PDU1TestProcedure:
@ -130,6 +133,24 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
Channel.off,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SCEX_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment on"))
command = pack_set_param_command(
object_id,
PDUConfigTable.out_en_5.parameter_address,
PDUConfigTable.out_en_5.parameter_size,
Channel.on,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SCEX_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment off"))
command = pack_set_param_command(
object_id,
PDUConfigTable.out_en_5.parameter_address,
PDUConfigTable.out_en_5.parameter_size,
Channel.off,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
tc_queue.appendleft(
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")

View File

@ -11,7 +11,11 @@ from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.packer import TcQueueT
from spacepackets.ecss.tc import PusTelecommand
from pus_tc.service_200_mode import pack_mode_data
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
from tmtccmd.utility.logger import get_console_logger
from utility.input_helper import InputHelper
LOGGER = get_console_logger()
class StarTrackerActionIds:
@ -28,7 +32,8 @@ class StarTrackerActionIds:
UPLOAD_IMAGE = 10
DOWNLOAD_CENTROID = 16
UPLOAD_CENTROID = 17
SUBSCRIBE_TO_TM = 18
SUBSCRIPTION = 18
IMAGE_PROCESSOR = 19
REQ_SOLUTION = 24
REQ_TEMPERATURE = 25
REQ_HISTOGRAM = 28
@ -61,10 +66,25 @@ class StarTrackerActionIds:
FPGA_ACTION = 66
REQ_CAMERA_PARAMS = 67
REQ_LIMITS = 68
REQ_BLOB_PARAMS = 69
REQ_LOG_LEVEL = 69
REQ_MOUNTING = 70
REQ_IMAGE_PROCESSOR = 71
REQ_CENTROIDING = 72
REQ_LISA = 73
REQ_MATCHING = 74
REQ_TRACKING = 75
REQ_VALIDATION = 76
REQ_ALGO = 77
REQ_SUBSCRIPTION = 78
REQ_LOG_SUBSCRIPTION = 79
REQ_DEBUG_CAMERA = 80
LOGLEVEL = 81
LOG_SUBSCRIPTION = 82
DEBUG_CAMERA = 83
FIRMWARE_UPDATE = 84
class ImagePathDefs:
class FileDefs:
uploadFile = "/mnt/sd0/startracker/gemma.bin"
downloadFile = "test_image.bin"
downloadPath = "/mnt/sd0/startracker"
@ -75,6 +95,27 @@ class ImagePathDefs:
downloadFpgaImagePath = "/mnt/sd0/startracker"
downloadFpgaImageName = "testname"
uploadFpgaImageName = "/mnt/sd0/startracker/fpga-image.bin"
egseGroundConfig = "/home/pi/arcsec/ground-config.json"
egseFlightConfig = "/home/pi/arcsec/flight-config.json"
q7sGroundConfig = "/mnt/sd0/startracker/ground-config.json"
q7sFlightConfig = "/mnt/sd0/startracker/flight-config.json"
firmware2_1 = "/home/pi/arcsec/firmware/sagitta2-1.bin"
firmware22_1 = "/home/pi/arcsec/firmware/sagitta-22.1.bin"
firmware_origin = "/home/arcsec/21-921600/sagitta.bin"
json_dict = {
"1": ["Q7S flight config", FileDefs.q7sFlightConfig],
"2": ["Q7S ground config", FileDefs.q7sGroundConfig],
"3": ["EGSE flight config", FileDefs.egseFlightConfig],
"4": ["EGSE ground config", FileDefs.egseGroundConfig]
}
firmware_dict = {
"1": ["Firmware Major = 2, Minor = 1", FileDefs.firmware2_1],
"2": ["Firmware Major = 22, Minor = 1", FileDefs.firmware22_1],
"3": ["Firmware Origin", FileDefs.firmware_origin],
}
class Region:
@ -92,8 +133,13 @@ class PartitionSize:
FREE_2 = 896000
class Submode:
BOOTLOADER = 1
FIRMWARE = 2
def pack_star_tracker_commands(
object_id: bytearray, tc_queue: TcQueueT, op_code: str
object_id: bytearray, tc_queue: TcQueueT, op_code: str
) -> TcQueueT:
tc_queue.appendleft(
(
@ -103,31 +149,36 @@ def pack_star_tracker_commands(
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode On"))
command = pack_mode_data(object_id, 1, 0)
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode On, Submode Bootloader"))
command = pack_mode_data(object_id, Modes.ON, Submode.BOOTLOADER)
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Normal"))
command = pack_mode_data(object_id, 2, 0)
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode On, Submode Firmware"))
command = pack_mode_data(object_id, Modes.ON, Submode.FIRMWARE)
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "2":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Off"))
command = pack_mode_data(object_id, 0, 0)
command = PusTelecommand(service=200, subservice=1, ssc=12, app_data=command)
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Normal"))
command = pack_mode_data(object_id, Modes.NORMAL, 0)
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "3":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Off"))
command = pack_mode_data(object_id, Modes.OFF, 0)
command = PusTelecommand(service=200, subservice=1, ssc=12, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mode Raw"))
command = pack_mode_data(object_id, 3, 0)
command = PusTelecommand(service=200, subservice=1, ssc=13, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
if op_code == "5":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Ping"))
command = object_id + struct.pack("!I", StarTrackerActionIds.PING)
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "5":
if op_code == "6":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Switch to bootloader program")
)
@ -136,368 +187,467 @@ def pack_star_tracker_commands(
)
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "6":
if op_code == "7":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Temperature request"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_TEMPERATURE)
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "7":
if op_code == "8":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request version"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_VERSION)
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "8":
if op_code == "9":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request interface"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_INTERFACE)
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "9":
if op_code == "10":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request power"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_POWER)
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "10":
if op_code == "11":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Subscribe to telemetry")
(QueueCommands.PRINT, "Star tracker: Set subscription parameters")
)
tm_id = int(input("Specify Id of tm: "))
jsonfile = get_config_file()
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.SUBSCRIBE_TO_TM)
+ struct.pack("B", tm_id)
object_id
+ struct.pack("!I", StarTrackerActionIds.SUBSCRIPTION)
+ bytearray(jsonfile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=36, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "11":
if op_code == "12":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Boot"))
command = object_id + struct.pack("!I", StarTrackerActionIds.BOOT)
command = PusTelecommand(service=8, subservice=128, ssc=37, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "12":
if op_code == "13":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request time"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_TIME)
command = PusTelecommand(service=8, subservice=128, ssc=38, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "13":
if op_code == "14":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request solution"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_SOLUTION)
command = PusTelecommand(service=8, subservice=128, ssc=39, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "14":
if op_code == "15":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Upload image"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_IMAGE)
+ bytearray(ImagePathDefs.uploadFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_IMAGE)
+ bytearray(FileDefs.uploadFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "15":
if op_code == "16":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download image"))
path = input("Specify storage location (default - /mnt/sd0/startracker): ")
if not path:
path = FileDefs.downloadPath
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_IMAGE)
+ bytearray(ImagePathDefs.downloadPath, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_IMAGE)
+ bytearray(path, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=53, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "16":
if op_code == "17":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set limits"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.LIMITS)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.LIMITS)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=42, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "17":
if op_code == "18":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Set tracking parameters")
)
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.TRACKING)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.TRACKING)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "18":
if op_code == "19":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Mounting"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.MOUNTING)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.MOUNTING)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "19":
if op_code == "20":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Camera"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.CAMERA)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.CAMERA)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "20":
if op_code == "21":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Blob"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.BLOB)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.BLOB)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=46, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "21":
if op_code == "22":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Centroiding"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.CENTROIDING)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.CENTROIDING)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=47, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "22":
if op_code == "23":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: LISA"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.LISA)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.LISA)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=48, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "23":
if op_code == "24":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Matching"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.MATCHING)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.MATCHING)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=49, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "24":
if op_code == "25":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Validation"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.VALIDATION)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.VALIDATION)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=50, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "25":
if op_code == "26":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Algo"))
jsonfile = get_config_file()
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.ALGO)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.ALGO)
+ bytearray(jsonfile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=51, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "26":
if op_code == "27":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Take image"))
actionid = int(input("Specify parameter ID (nominal - 4): "))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.TAKE_IMAGE)
+ struct.pack("!B", actionid)
object_id
+ struct.pack("!I", StarTrackerActionIds.TAKE_IMAGE)
+ struct.pack("!B", actionid)
)
command = PusTelecommand(service=8, subservice=128, ssc=52, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "27":
if op_code == "28":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Stop str helper"))
command = object_id + struct.pack("!I", StarTrackerActionIds.STOP_STR_HELPER)
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "28":
if op_code == "29":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Reset error signal"))
command = object_id + struct.pack("!I", StarTrackerActionIds.RESET_ERROR)
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "29":
if op_code == "30":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Set name of download image")
)
filename = input("Specify download image name: ")
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.CHANGE_DOWNLOAD_IMAGE)
+ bytearray(filename, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.CHANGE_DOWNLOAD_IMAGE)
+ bytearray(filename, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "30":
if op_code == "31":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request histogram"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_HISTOGRAM)
command = PusTelecommand(service=8, subservice=128, ssc=55, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "31":
if op_code == "32":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request contrast"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_CONTRAST)
command = PusTelecommand(service=8, subservice=128, ssc=56, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "32":
if op_code == "33":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set json filename"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.SET_JSON_FILE_NAME)
+ bytearray(ImagePathDefs.jsonFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.SET_JSON_FILE_NAME)
+ bytearray(FileDefs.jsonFile, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=57, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "33":
if op_code == "34":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Write"))
command = pack_write_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=58, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "34":
if op_code == "35":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Read"))
command = pack_read_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=59, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "35":
if op_code == "36":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set read filename"))
filename = input("Specify filename: ")
command = (
object_id
+ StarTrackerActionIds.SET_READ_FILENAME
+ bytearray(filename, "utf-8")
object_id
+ StarTrackerActionIds.SET_READ_FILENAME
+ bytearray(filename, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=60, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "36":
if op_code == "37":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Get checksum"))
command = pack_checksum_command(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=61, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "37":
if op_code == "38":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set time"))
unix_time = 1640783543
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.SET_TIME)
+ struct.pack("!Q", unix_time)
object_id
+ struct.pack("!I", StarTrackerActionIds.SET_TIME)
+ struct.pack("!Q", unix_time)
)
command = PusTelecommand(service=8, subservice=128, ssc=61, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "38":
if op_code == "39":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download Centroid"))
id = 0
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_CENTROID)
+ struct.pack("!B", id)
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_CENTROID)
+ struct.pack("!B", id)
)
command = PusTelecommand(service=8, subservice=128, ssc=62, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "39":
if op_code == "40":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Upload Centroid"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_CENTROID)
+ bytearray(ImagePathDefs.uploadCentroidJson, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_CENTROID)
+ bytearray(FileDefs.uploadCentroidJson, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "40":
if op_code == "41":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Download matched star")
)
id = 0
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_MATCHED_STAR)
+ struct.pack("!B", id)
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_MATCHED_STAR)
+ struct.pack("!B", id)
)
command = PusTelecommand(service=8, subservice=128, ssc=64, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "41":
if op_code == "42":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download DB Image"))
id = 0
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_DBIMAGE)
+ struct.pack("!B", id)
)
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "42":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download Blob Pixel"))
id = 0
type = 1 # 0 - normal, 1 - fast
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_BLOBPIXEL)
+ struct.pack("!B", id)
+ struct.pack("!B", type)
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_DBIMAGE)
+ struct.pack("!B", id)
)
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "43":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download Blob Pixel"))
id = 0
type = 1 # 0 - normal, 1 - fast
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_BLOBPIXEL)
+ struct.pack("!B", id)
+ struct.pack("!B", type)
)
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "44":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download FPGA Image"))
position = int(input("Start position: "))
length = int(input("Size to download: "))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_FPGA_IMAGE)
+ struct.pack("!I", position)
+ struct.pack("!I", length)
+ bytearray(ImagePathDefs.downloadFpgaImagePath, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_FPGA_IMAGE)
+ struct.pack("!I", position)
+ struct.pack("!I", length)
+ bytearray(FileDefs.downloadFpgaImagePath, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "44":
if op_code == "45":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Change donwload FPGA image file name")
)
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.CHANGE_FPGA_DOWNLOAD_FILE)
+ bytearray(ImagePathDefs.downloadFpgaImageName, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.CHANGE_FPGA_DOWNLOAD_FILE)
+ bytearray(FileDefs.downloadFpgaImageName, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "45":
if op_code == "46":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Upload FPGA image"))
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_FPGA_IMAGE)
+ bytearray(ImagePathDefs.uploadFpgaImageName, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.UPLOAD_FPGA_IMAGE)
+ bytearray(FileDefs.uploadFpgaImageName, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=68, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "46":
if op_code == "47":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: FPGA action"))
id = 3
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.FPGA_ACTION)
+ struct.pack("!B", id)
object_id
+ struct.pack("!I", StarTrackerActionIds.FPGA_ACTION)
+ struct.pack("!B", id)
)
command = PusTelecommand(service=8, subservice=128, ssc=69, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "47":
if op_code == "48":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Unlock"))
command = object_id + struct.pack("!I", StarTrackerActionIds.UNLOCK)
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "48":
if op_code == "49":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Request camera parameters")
)
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_CAMERA_PARAMS)
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "49":
if op_code == "50":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request limits"))
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_LIMITS)
command = PusTelecommand(service=8, subservice=128, ssc=72, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "50":
tc_queue.appendleft(
(QueueCommands.PRINT, "Star tracker: Request blob parameters")
)
command = object_id + struct.pack("!I", StarTrackerActionIds.REQ_BLOB_PARAMS)
command = PusTelecommand(service=8, subservice=128, ssc=73, app_data=command)
if op_code == "51":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set image processor parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.IMAGE_PROCESSOR) + \
bytearray(FileDefs.jsonFile, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "52":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: EGSE load ground config camera parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.CAMERA) + \
bytearray(FileDefs.egseGroundConfig, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "53":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: EGSE load flight config camera parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.CAMERA) + \
bytearray(FileDefs.egseFlightConfig, 'utf-8')
command = PusTelecommand(service=8, subservice=128, ssc=72, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "54":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request log level parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_LOG_LEVEL)
command = PusTelecommand(service=8, subservice=128, ssc=74, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "55":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request mounting parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_MOUNTING)
command = PusTelecommand(service=8, subservice=128, ssc=75, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "56":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request image processor parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_IMAGE_PROCESSOR)
command = PusTelecommand(service=8, subservice=128, ssc=76, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "57":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request centroiding parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_CENTROIDING)
command = PusTelecommand(service=8, subservice=128, ssc=75, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "58":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request lisa parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_LISA)
command = PusTelecommand(service=8, subservice=128, ssc=76, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "59":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request matching parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_MATCHING)
command = PusTelecommand(service=8, subservice=128, ssc=77, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "60":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request tracking parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_TRACKING)
command = PusTelecommand(service=8, subservice=128, ssc=78, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "61":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request validation parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_VALIDATION)
command = PusTelecommand(service=8, subservice=128, ssc=79, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "62":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request algo parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_ALGO)
command = PusTelecommand(service=8, subservice=128, ssc=80, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "63":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request subscription parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_SUBSCRIPTION)
command = PusTelecommand(service=8, subservice=128, ssc=81, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "64":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request log subscription parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_LOG_SUBSCRIPTION)
command = PusTelecommand(service=8, subservice=128, ssc=82, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "65":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request debug camera parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_DEBUG_CAMERA)
command = PusTelecommand(service=8, subservice=128, ssc=83, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "66":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set log level parameters"))
jsonfile = get_config_file()
command = object_id + struct.pack('!I', StarTrackerActionIds.LOGLEVEL) + bytearray(jsonfile, "utf-8")
command = PusTelecommand(service=8, subservice=128, ssc=84, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "67":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set log subscription parameters"))
jsonfile = get_config_file()
command = object_id + struct.pack('!I', StarTrackerActionIds.LOG_SUBSCRIPTION) + bytearray(jsonfile, "utf-8")
command = PusTelecommand(service=8, subservice=128, ssc=85, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "68":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Set debug camera parameters"))
jsonfile = get_config_file()
command = object_id + struct.pack('!I', StarTrackerActionIds.DEBUG_CAMERA) + bytearray(jsonfile, "utf-8")
command = PusTelecommand(service=8, subservice=128, ssc=86, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "69":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Firmware update"))
firmware = get_firmware()
command = object_id + struct.pack('!I', StarTrackerActionIds.FIRMWARE_UPDATE) + bytearray(firmware, "utf-8")
command = PusTelecommand(service=8, subservice=128, ssc=87, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
<<<<<<< Updated upstream
=======
@ -526,11 +676,11 @@ def pack_write_command(object_id: bytearray) -> bytearray:
region = Region.FREE_1
address = 0
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.WRITE)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ bytearray(ImagePathDefs.flashFile, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.WRITE)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ bytearray(FileDefs.flashFile, "utf-8")
)
return command
@ -540,12 +690,12 @@ def pack_read_command(object_id: bytearray) -> bytearray:
address = 0
size = PartitionSize.STAR_TRACKER_FIRMWARE
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.READ)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ struct.pack("!I", size)
+ bytearray(ImagePathDefs.flashReadPath, "utf-8")
object_id
+ struct.pack("!I", StarTrackerActionIds.READ)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ struct.pack("!I", size)
+ bytearray(FileDefs.flashReadPath, "utf-8")
)
return command
@ -555,10 +705,26 @@ def pack_checksum_command(object_id: bytearray) -> bytearray:
address = 0
size = PartitionSize.STAR_TRACKER_FIRMWARE
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.CHECKSUM)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ struct.pack("!I", size)
object_id
+ struct.pack("!I", StarTrackerActionIds.CHECKSUM)
+ struct.pack("!B", region)
+ struct.pack("!I", address)
+ struct.pack("!I", size)
)
return command
def get_config_file() -> str:
LOGGER.info("Specify json file")
input_helper = InputHelper(json_dict)
key = input_helper.get_key()
jsonfile = json_dict[key][1]
return jsonfile
def get_firmware() -> str:
LOGGER.info("Specify firmware file")
input_helper = InputHelper(firmware_dict)
key = input_helper.get_key()
firmware = firmware_dict[key][1]
return firmware

View File

@ -14,6 +14,7 @@ from pus_tc.service_200_mode import pack_service200_test_into
from pus_tc.p60dock import pack_p60dock_test_into
from pus_tc.pdu2 import pack_pdu2_commands
from pus_tc.pdu1 import pack_pdu1_commands
from pus_tc.bpx_batt import pack_bpx_commands
from pus_tc.acu import pack_acu_test_into
from pus_tc.imtq import pack_imtq_test_into
from pus_tc.tmp1075 import pack_tmp1075_test_into
@ -94,6 +95,8 @@ def pack_service_queue_user(
return pack_acu_test_into(
object_id=object_id, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.BPX_BATTERY.value:
return pack_bpx_commands(tc_queue=service_queue, op_code=op_code)
if service == CustomServiceList.TMP1075_1.value:
object_id = TMP_1075_1_HANDLER_ID
return pack_tmp1075_test_into(