added assembly mode commands

This commit is contained in:
2022-05-05 16:23:17 +02:00
parent e616614a04
commit 3bc19a387f
2 changed files with 14 additions and 8 deletions

View File

@ -10,7 +10,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
from tmtccmd.config.globals import add_op_code_entry, add_service_op_code_entry
from tmtccmd.tc.packer import TcQueueT
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices
from config.definitions import CustomServiceList
@ -161,11 +161,17 @@ def pack_single_rw_test_into(
def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
if op_code in OpCodesAss.OFF:
pass
data = pack_mode_data(object_id=object_id, mode=Modes.OFF, submode=0)
cmd = PusTelecommand(service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in OpCodesAss.ON:
pass
data = pack_mode_data(object_id=object_id, mode=Modes.ON, submode=0)
cmd = PusTelecommand(service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in OpCodesAss.NML:
pass
data = pack_mode_data(object_id=object_id, mode=Modes.NORMAL, submode=0)
cmd = PusTelecommand(service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data)
tc_queue.appendleft(cmd.pack_command_tuple())
def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> bytearray: