syrlinks mode commands

This commit is contained in:
Jakob Meier
2022-03-29 07:57:39 +02:00
parent 3e1dcdf430
commit ed85e1706f
3 changed files with 17 additions and 13 deletions

View File

@ -10,6 +10,7 @@ from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
class SetIds:
@ -39,20 +40,20 @@ def pack_syrlinks_command(
if op_code == "0":
tc_queue.appendleft(
(QueueCommands.PRINT, "PLOC Supervisor: Set mode off")
(QueueCommands.PRINT, "Syrlinks: Set mode off")
)
command = pack_mode_data(object_id, Modes.OFF, 0)
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, "PLOC Supervisor: Set mode on")
(QueueCommands.PRINT, "Syrlinks: Set mode on")
)
command = pack_mode_data(object_id, Modes.ON, 0)
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 Normal"))
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: 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())