some minor fixes

This commit is contained in:
Robin Müller 2024-01-25 10:36:23 +01:00
parent 3d007c32a3
commit ebd9792fb9
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 4 additions and 6 deletions

View File

@ -95,7 +95,7 @@ class ActionId(enum.IntEnum):
class ParamId(enum.IntEnum):
PLOC_SUPV_CMD_TO_ON = 1
PLOC_SUPV_SKIP_CMD_TO_ON = 1
class OpCode:
@ -341,12 +341,11 @@ def pack_ploc_mpsoc_commands(
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_MODE_SNAPSHOT)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
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_pus_tc(
create_load_param_cmd(
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(
create_load_param_cmd(
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
)
)
)

View File

@ -145,7 +145,6 @@ class OpCode:
class Info(str, enum.Enum):
value: str
OFF = "Switch Off"
ON = "Switch On"
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)
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
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)
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
if cmd_str == OpCode.HK_TO_OBC: