more missing flags and finalized rw proc

This commit is contained in:
2022-05-25 10:53:39 +02:00
parent aa01fe4401
commit ebf44e8b0e
2 changed files with 67 additions and 51 deletions

View File

@ -196,7 +196,7 @@ def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
tc_queue.appendleft(cmd.pack_command_tuple())
def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> bytearray:
def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> PusTelecommand:
"""With this function a command is packed to set the speed of a reaction wheel
:param object_id: The object id of the reaction wheel handler.
:param speed: Valid speeds are [-65000, -1000] and [1000, 65000]. Values are
@ -209,4 +209,5 @@ def pack_set_speed_command(object_id: bytes, speed: int, ramp_time: int) -> byte
command += object_id + command_id
command = command + struct.pack("!i", speed)
command = command + ramp_time.to_bytes(length=2, byteorder="big")
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
return command