request contrast command

This commit is contained in:
Jakob Meier 2021-12-19 11:35:16 +01:00
parent f5613e5e80
commit 02b6304eba
2 changed files with 7 additions and 0 deletions

View File

@ -314,6 +314,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
"28": ("Star Tracker: Reset error signal", {OpCodeDictKeys.TIMEOUT: 2.0}),
"29": ("Star Tracker: Set name of download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
"30": ("Star Tracker: Request histogram", {OpCodeDictKeys.TIMEOUT: 2.0}),
"31": ("Star Tracker: Request contrast", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)

View File

@ -28,6 +28,7 @@ class StarTrackerActionIds:
REQ_SOLUTION = 24
REQ_TEMPERATURE = 25
REQ_HISTOGRAM = 28
REQ_CONTRAST = 29
LIMITS = 40
MOUNTING = 41
CAMERA = 42
@ -228,3 +229,8 @@ def pack_star_tracker_commands(object_id: bytearray, tc_queue: TcQueueT, op_code
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":
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())