RW commanding fixes

This commit is contained in:
Robin Müller 2024-02-20 11:26:36 +01:00
parent 1cd566a94c
commit 7a56c604a6
2 changed files with 13 additions and 13 deletions

View File

@ -198,29 +198,29 @@ def handle_acs_procedure(queue_helper: DefaultPusQueueHelper, cmd_path_list: Lis
)
if cmd_path_list[0] == "rws":
assert len(cmd_path_list) >= 3
assert len(cmd_path_list) >= 2
if cmd_path_list[1] == "rw_assy":
assert len(cmd_path_list) >= 4
assert len(cmd_path_list) >= 3
return pack_rw_ass_cmds(
q=queue_helper, object_id=RW_ASSEMBLY, cmd_str=cmd_path_list[2]
)
if cmd_path_list[1] == "rw_1":
assert len(cmd_path_list) >= 4
assert len(cmd_path_list) >= 3
return create_single_rw_cmd(
object_id=RW1_ID, rw_idx=1, q=queue_helper, cmd_str=cmd_path_list[2]
)
if cmd_path_list[1] == "rw_2":
assert len(cmd_path_list) >= 4
assert len(cmd_path_list) >= 3
return create_single_rw_cmd(
object_id=RW2_ID, rw_idx=2, q=queue_helper, cmd_str=cmd_path_list[2]
)
if cmd_path_list[1] == "rw_3":
assert len(cmd_path_list) >= 4
assert len(cmd_path_list) >= 3
return create_single_rw_cmd(
object_id=RW3_ID, rw_idx=3, q=queue_helper, cmd_str=cmd_path_list[2]
)
if cmd_path_list[1] == "rw_4":
assert len(cmd_path_list) >= 4
assert len(cmd_path_list) >= 3
return create_single_rw_cmd(
object_id=RW4_ID, rw_idx=4, q=queue_helper, cmd_str=cmd_path_list[2]
)

View File

@ -6,7 +6,7 @@
"""
import enum
import struct
from typing import List
from typing import List, Tuple
from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.config.object_ids import RW1_ID, RW2_ID, RW3_ID, RW4_ID
@ -126,11 +126,11 @@ def create_reaction_wheel_assembly_node() -> CmdTreeNode:
node = CmdTreeNode(
"rw_assy", "Reaction Wheels Assembly", hide_children_which_are_leaves=True
)
node.add_child(CmdTreeNode(InfoAss.ON, OpCodesAss.ON))
node.add_child(CmdTreeNode(InfoAss.NML, OpCodesAss.NML))
node.add_child(CmdTreeNode(InfoAss.OFF, OpCodesAss.OFF))
node.add_child(CmdTreeNode(InfoAss.ALL_SPEED_UP, OpCodesAss.ALL_SPEED_UP))
node.add_child(CmdTreeNode(InfoAss.ALL_SPEED_OFF, OpCodesAss.ALL_SPEED_OFF))
node.add_child(CmdTreeNode(OpCodesAss.ON, InfoAss.ON))
node.add_child(CmdTreeNode(OpCodesAss.NML, InfoAss.NML))
node.add_child(CmdTreeNode(OpCodesAss.OFF, InfoAss.OFF))
node.add_child(CmdTreeNode(OpCodesAss.ALL_SPEED_UP, InfoAss.ALL_SPEED_UP))
node.add_child(CmdTreeNode(OpCodesAss.ALL_SPEED_OFF, InfoAss.ALL_SPEED_OFF))
return node
@ -272,7 +272,7 @@ def pack_rw_ass_cmds(q: DefaultPusQueueHelper, object_id: bytes, cmd_str: str):
)
def prompt_speed_ramp_time() -> (int, int):
def prompt_speed_ramp_time() -> Tuple[int, int]:
speed = int(
input("Specify speed [0.1 RPM, 0 or range [-65000, -1000] and [1000, 65000]: ")
)