update power commands
This commit is contained in:
@ -20,7 +20,7 @@ from gomspace.gomspace_common import GomspaceOpCodes
|
||||
from gomspace.gomspace_common import GsInfo as GsInfo
|
||||
from config.object_ids import ACU_HANDLER_ID
|
||||
from pus_tc.devs.p60dock import P60DockConfigTable
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ def pack_acu_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd("ACU: Print channel stats")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=object_id.as_bytes,
|
||||
action_id=gs.GomspaceDeviceActionIds.PRINT_SWITCH_V_I,
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ from config.object_ids import BPX_HANDLER_ID
|
||||
from tmtccmd import DefaultProcedureInfo, TcHandlerBase
|
||||
from tmtccmd.tc import DefaultPusQueueHelper, service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||
|
||||
|
||||
@ -38,14 +38,14 @@ def pack_bpx_commands(p: ServiceProviderParams):
|
||||
if op_code in BpxOpCodes.RST_BOOT_CNT:
|
||||
q.add_log_cmd("Resetting reboot counters")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS
|
||||
)
|
||||
)
|
||||
if op_code in BpxOpCodes.REQUEST_CFG:
|
||||
q.add_log_cmd("Requesting configuration struct")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG
|
||||
)
|
||||
)
|
||||
@ -56,7 +56,7 @@ def pack_bpx_commands(p: ServiceProviderParams):
|
||||
if op_code in BpxOpCodes.REBOOT:
|
||||
q.add_log_cmd("Rebooting BPX battery")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT
|
||||
)
|
||||
)
|
||||
|
@ -7,7 +7,8 @@ from gomspace.gomspace_common import (
|
||||
Channel,
|
||||
GomspaceOpCodes,
|
||||
GsInfo,
|
||||
SetIds, GomspaceDeviceActionIds,
|
||||
SetIds,
|
||||
GomspaceDeviceActionIds,
|
||||
)
|
||||
from gomspace.gomspace_pdu_definitions import PDU_CONFIG_LIST
|
||||
from pus_tm.defs import PrintWrapper
|
||||
|
@ -16,7 +16,7 @@ from tmtccmd.tc.pus_201_fsfw_health import (
|
||||
FsfwHealth,
|
||||
Subservices,
|
||||
)
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
@ -200,6 +200,6 @@ def pack_switch_heater_command(
|
||||
command.append(switch_nr)
|
||||
command.append(switch_action)
|
||||
command.append(COMMAND_SOURCE_PARAM_EXTERNAL)
|
||||
return generate_action_command(
|
||||
return make_fsfw_action_cmd(
|
||||
object_id=object_id, action_id=ActionIds.SWITCH_HEATER, app_data=command
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ from gomspace.gomspace_common import (
|
||||
SetIds,
|
||||
)
|
||||
from config.object_ids import P60_DOCK_HANDLER
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.util import ObjectIdU32
|
||||
|
||||
|
||||
@ -150,14 +150,14 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd("P60 Dock: Print Switches, Voltages, Currents")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd("P60 Dock: Print Latchups")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
)
|
||||
|
@ -42,14 +42,14 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd("PDU1: Print Switches, Voltages, Currents")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd("PDU1: Print Latchups")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
)
|
||||
@ -113,4 +113,3 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
Channel.off,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -46,14 +46,14 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd(f"PDU2: {GsInfo.PRINT_SWITCH_V_I}")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd("PDU2: Print Latchups")
|
||||
q.add_pus_tc(
|
||||
generate_action_command(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ from tmtccmd import DefaultProcedureInfo, TcHandlerBase
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
from tmtccmd.tc import DefaultPusQueueHelper, service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||
from config.object_ids import SCEX_HANDLER_ID
|
||||
|
||||
@ -71,25 +71,23 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
if op_code in OpCodes.PING:
|
||||
q.add_log_cmd(Info.PING)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.PING, app_data))
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.PING, app_data))
|
||||
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(make_fsfw_action_cmd(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)
|
||||
make_fsfw_action_cmd(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)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data)
|
||||
)
|
||||
|
||||
# one cell
|
||||
@ -137,7 +135,7 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data.append(dac_weight3[cn])
|
||||
|
||||
q.add_pus_tc(
|
||||
generate_action_command(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data)
|
||||
)
|
||||
|
||||
if op_code in OpCodes.ALL_CELLS_CMD:
|
||||
@ -169,13 +167,13 @@ def pack_scex_cmds(p: ServiceProviderParams):
|
||||
app_data.append(dac_weight3[cn])
|
||||
|
||||
q.add_pus_tc(
|
||||
generate_action_command(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data)
|
||||
make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data)
|
||||
)
|
||||
|
||||
if op_code in OpCodes.FRAM:
|
||||
q.add_log_cmd(Info.FRAM)
|
||||
app_data = bytes([0])
|
||||
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.FRAM, app_data))
|
||||
q.add_pus_tc(make_fsfw_action_cmd(SCEX_HANDLER_ID, ActionIds.FRAM, app_data))
|
||||
|
||||
|
||||
def append_16_bit_val(packet: bytearray, val: int):
|
||||
|
Reference in New Issue
Block a user