continued update to new API

This commit is contained in:
2022-07-04 17:59:09 +02:00
parent 27edcbd71d
commit 2b285417a0
19 changed files with 727 additions and 1012 deletions

View File

@ -130,7 +130,7 @@ def add_rw_cmds(cmd_dict: ServiceOpCodeDictT):
def pack_single_rw_test_into(
object_id: bytes, rw_idx: int, q: QueueHelper, op_code: str
) -> TcQueueT:
):
if op_code in OpCodesDevs.SPEED:
speed = int(input("Specify speed [0.1 RPM]: "))
ramp_time = int(input("Specify ramp time [ms]: "))
@ -166,28 +166,30 @@ def pack_single_rw_test_into(
sid=make_sid(object_id=object_id, set_id=RwSetIds.STATUS_SET_ID)
)
)
return q
def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
def pack_rw_ass_cmds(q: QueueHelper, object_id: bytes, op_code: str):
if op_code in OpCodesAss.OFF:
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
q.add_pus_tc(
PusTelecommand(
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
)
)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in OpCodesAss.ON:
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
q.add_pus_tc(
PusTelecommand(
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
)
)
tc_queue.appendleft(cmd.pack_command_tuple())
if op_code in OpCodesAss.NML:
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
q.add_pus_tc(
PusTelecommand(
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
)
)
tc_queue.appendleft(cmd.pack_command_tuple())
def pack_set_speed_command(