v1.9.0 #53

Merged
muellerr merged 354 commits from develop into master 2022-04-07 17:39:42 +02:00
3 changed files with 37 additions and 17 deletions
Showing only changes of commit b06211d086 - Show all commits

View File

@ -520,7 +520,10 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
"36": ("Star Tracker: Get checksum", {OpCodeDictKeys.TIMEOUT: 2.0}),
"37": ("Star Tracker: Set time", {OpCodeDictKeys.TIMEOUT: 2.0}),
"38": ("Star Tracker: Download centroid", {OpCodeDictKeys.TIMEOUT: 2.0}),
"39": ("Star Tracker: Upload centroid (not implemented?)", {OpCodeDictKeys.TIMEOUT: 2.0}),
"39": (
"Star Tracker: Upload centroid (not implemented?)",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
"40": ("Star Tracker: Download matched star", {OpCodeDictKeys.TIMEOUT: 2.0}),
"41": ("Star Tracker: Download DB Image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"42": ("Star Tracker: Download Blob Pixel", {OpCodeDictKeys.TIMEOUT: 2.0}),

View File

@ -30,8 +30,10 @@ def pack_ccsds_handler_test(
object_id: bytearray, tc_queue: TcQueueT, op_code: str
) -> TcQueueT:
tc_queue.appendleft(
(QueueCommands.PRINT,
"Testing CCSDS handler with object id: 0x" + object_id.hex())
(
QueueCommands.PRINT,
"Testing CCSDS handler with object id: 0x" + object_id.hex(),
)
)
if op_code == "0":
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set low rate"))
@ -58,9 +60,11 @@ def pack_ccsds_handler_test(
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "4":
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set arbitrary bitrate"))
tc_queue.appendleft(
(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 + 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())

View File

@ -436,15 +436,24 @@ def pack_star_tracker_commands(
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')
command = (
object_id
+ struct.pack("!I", StarTrackerActionIds.DOWNLOAD_FPGA_IMAGE)
+ struct.pack("!I", position)
+ struct.pack("!I", length)
+ bytearray(ImagePathDefs.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":
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')
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")
)
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "45":
@ -468,22 +477,26 @@ def pack_star_tracker_commands(
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "47":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Unlock"))
command = object_id + struct.pack('!I', StarTrackerActionIds.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":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request camera parameters"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_CAMERA_PARAMS)
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":
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request limits"))
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_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)
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)
tc_queue.appendleft(command.pack_command_tuple())