some minor fixes
This commit is contained in:
parent
3d007c32a3
commit
ebd9792fb9
@ -95,7 +95,7 @@ class ActionId(enum.IntEnum):
|
|||||||
|
|
||||||
|
|
||||||
class ParamId(enum.IntEnum):
|
class ParamId(enum.IntEnum):
|
||||||
PLOC_SUPV_CMD_TO_ON = 1
|
PLOC_SUPV_SKIP_CMD_TO_ON = 1
|
||||||
|
|
||||||
|
|
||||||
class OpCode:
|
class OpCode:
|
||||||
@ -341,12 +341,11 @@ def pack_ploc_mpsoc_commands(
|
|||||||
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_MODE_SNAPSHOT)
|
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_MODE_SNAPSHOT)
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||||
if cmd_str == OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON:
|
if cmd_str == OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON:
|
||||||
print("shit")
|
|
||||||
q.add_log_cmd(Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON)
|
q.add_log_cmd(Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
create_load_param_cmd(
|
create_load_param_cmd(
|
||||||
create_scalar_u8_parameter(
|
create_scalar_u8_parameter(
|
||||||
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 0
|
object_id.as_bytes, 0, ParamId.PLOC_SUPV_SKIP_CMD_TO_ON, 0
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -355,7 +354,7 @@ def pack_ploc_mpsoc_commands(
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
create_load_param_cmd(
|
create_load_param_cmd(
|
||||||
create_scalar_u8_parameter(
|
create_scalar_u8_parameter(
|
||||||
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 1
|
object_id.as_bytes, 0, ParamId.PLOC_SUPV_SKIP_CMD_TO_ON, 1
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -145,7 +145,6 @@ class OpCode:
|
|||||||
|
|
||||||
|
|
||||||
class Info(str, enum.Enum):
|
class Info(str, enum.Enum):
|
||||||
value: str
|
|
||||||
OFF = "Switch Off"
|
OFF = "Switch Off"
|
||||||
ON = "Switch On"
|
ON = "Switch On"
|
||||||
NORMAL = "Switch Normal"
|
NORMAL = "Switch Normal"
|
||||||
@ -192,7 +191,7 @@ def pack_ploc_supv_commands(q: DefaultPusQueueHelper, cmd_str: str): # noqa C90
|
|||||||
command = pack_mode_data(object_id.as_bytes, Mode.ON, 0)
|
command = pack_mode_data(object_id.as_bytes, Mode.ON, 0)
|
||||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||||
if cmd_str == OpCode.NORMAL:
|
if cmd_str == OpCode.NORMAL:
|
||||||
q.add_log_cmd(f"{prefix}: {Info.NML}")
|
q.add_log_cmd(f"{prefix}: {Info.NORMAL}")
|
||||||
command = pack_mode_data(object_id.as_bytes, Mode.NORMAL, 0)
|
command = pack_mode_data(object_id.as_bytes, Mode.NORMAL, 0)
|
||||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||||
if cmd_str == OpCode.HK_TO_OBC:
|
if cmd_str == OpCode.HK_TO_OBC:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user