applied black again
This commit is contained in:
parent
3a045ec4b4
commit
b06211d086
@ -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}),
|
"36": ("Star Tracker: Get checksum", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"37": ("Star Tracker: Set time", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"37": ("Star Tracker: Set time", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"38": ("Star Tracker: Download centroid", {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}),
|
"40": ("Star Tracker: Download matched star", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"41": ("Star Tracker: Download DB Image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"41": ("Star Tracker: Download DB Image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"42": ("Star Tracker: Download Blob Pixel", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"42": ("Star Tracker: Download Blob Pixel", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
@ -30,8 +30,10 @@ def pack_ccsds_handler_test(
|
|||||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
||||||
) -> TcQueueT:
|
) -> TcQueueT:
|
||||||
tc_queue.appendleft(
|
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":
|
if op_code == "0":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set low rate"))
|
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)
|
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "4":
|
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): "))
|
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)
|
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
@ -436,15 +436,24 @@ def pack_star_tracker_commands(
|
|||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download FPGA Image"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Download FPGA Image"))
|
||||||
position = int(input("Start position: "))
|
position = int(input("Start position: "))
|
||||||
length = int(input("Size to download: "))
|
length = int(input("Size to download: "))
|
||||||
command = object_id + struct.pack('!I', StarTrackerActionIds.DOWNLOAD_FPGA_IMAGE) + \
|
command = (
|
||||||
struct.pack('!I', position) + struct.pack('!I', length) + bytearray(
|
object_id
|
||||||
ImagePathDefs.downloadFpgaImagePath, 'utf-8')
|
+ 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)
|
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "44":
|
if op_code == "44":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Change donwload FPGA image file name"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', StarTrackerActionIds.CHANGE_FPGA_DOWNLOAD_FILE) + \
|
(QueueCommands.PRINT, "Star tracker: Change donwload FPGA image file name")
|
||||||
bytearray(ImagePathDefs.downloadFpgaImageName, 'utf-8')
|
)
|
||||||
|
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)
|
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "45":
|
if op_code == "45":
|
||||||
@ -468,22 +477,26 @@ def pack_star_tracker_commands(
|
|||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "47":
|
if op_code == "47":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Unlock"))
|
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)
|
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "48":
|
if op_code == "48":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request camera parameters"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_CAMERA_PARAMS)
|
(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)
|
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "49":
|
if op_code == "49":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request limits"))
|
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)
|
command = PusTelecommand(service=8, subservice=128, ssc=72, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == "50":
|
if op_code == "50":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Request blob parameters"))
|
tc_queue.appendleft(
|
||||||
command = object_id + struct.pack('!I', StarTrackerActionIds.REQ_BLOB_PARAMS)
|
(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)
|
command = PusTelecommand(service=8, subservice=128, ssc=73, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user