update dependencies

This commit is contained in:
2022-08-08 16:32:18 +02:00
parent 6efd7a4ef1
commit 76da5753f6
38 changed files with 170 additions and 112 deletions

View File

@ -2,7 +2,7 @@ import enum
import json
from config.definitions import CustomServiceList
from tmtccmd.tc import QueueHelper
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_8_funccmd import generate_action_command
from tmtccmd.config import OpCodeEntry, TmTcDefWrapper
from config.object_ids import SCEX_HANDLER_ID
@ -56,13 +56,11 @@ def add_scex_cmds(defs: TmTcDefWrapper):
oce.add(keys=OpCodes.FRAM, info=Info.FRAM)
defs.add_service(
name=CustomServiceList.SCEX.value,
info="SCEX Device",
op_code_entry=oce
name=CustomServiceList.SCEX.value, info="SCEX Device", op_code_entry=oce
)
def pack_scex_cmds(q: QueueHelper, op_code: str):
def pack_scex_cmds(q: DefaultPusQueueHelper, op_code: str):
if op_code in OpCodes.PING:
q.add_log_cmd(Info.PING)
app_data = bytes([0])
@ -70,17 +68,23 @@ def pack_scex_cmds(q: QueueHelper, op_code: str):
if op_code in OpCodes.ION_CMD:
q.add_log_cmd(Info.ION_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ION_CMD, app_data))
q.add_pus_tc(
generate_action_command(SCEX_HANDLER_ID, ActionIds.ION_CMD, app_data)
)
if op_code in OpCodes.TEMP_CMD:
q.add_log_cmd(Info.TEMP_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.TEMP_CMD, app_data))
q.add_pus_tc(
generate_action_command(SCEX_HANDLER_ID, ActionIds.TEMP_CMD, app_data)
)
if op_code in OpCodes.EXP_STATUS_CMD:
q.add_log_cmd(Info.EXP_STATUS_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data))
q.add_pus_tc(
generate_action_command(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data)
)
# one cell
if op_code in OpCodes.ONE_CELLS_CMD:
@ -126,7 +130,9 @@ def pack_scex_cmds(q: QueueHelper, op_code: str):
app_data.append(dac_weight2[cn])
app_data.append(dac_weight3[cn])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data))
q.add_pus_tc(
generate_action_command(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data)
)
if op_code in OpCodes.ALL_CELLS_CMD:
q.add_log_cmd(Info.ALL_CELLS_CMD)
@ -156,7 +162,9 @@ def pack_scex_cmds(q: QueueHelper, op_code: str):
app_data.append(dac_weight2[cn])
app_data.append(dac_weight3[cn])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data))
q.add_pus_tc(
generate_action_command(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data)
)
if op_code in OpCodes.FRAM:
q.add_log_cmd(Info.FRAM)