add battery tv test procedure

This commit is contained in:
2022-05-18 20:00:59 +02:00
parent ca5fd6468c
commit 817a89370a
5 changed files with 40 additions and 22 deletions

View File

@ -1,24 +1,42 @@
from tmtccmd.config import QueueCommands
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.pus_3_fsfw_hk import *
from config.object_ids import BPX_HANDLER_ID
from pus_tc.devs.bpx_batt import BpxSetIds
class OpCodes:
HEATER = ["0", "heater"]
BAT_FT = ["bat-ft"]
class Info:
HEATER = "heater procedure"
BAT_FT = "battery functional test"
def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
testint = 10
print(f"hello world{op_code} {testint}")
if op_code in OpCodes.HEATER:
tc_queue.appendleft((QueueCommands.PRINT, "TUrning heater 0 on"))
tc_queue.appendleft(heater1cmd_on.pack_command_tuple())
tc_queue.appendleft((QueueCommands.PRINT, "TUrning heater 0 off"))
tc_queue.appendleft(heater1cmd_off.pack_command_tuple())
tc_queue.appendleft(heater1cmd.pack_command_tuple())
tc_queue.appendleft(heater1cmd.pack_command_tuple())
if op_code in OpCodes.BAT_FT:
tc_queue.appendleft(
(
QueueCommands.PRINT,
f"Executing Battery functional test Procedure ({OpCodes.BAT_FT})",
)
)
tc_queue.appendleft((QueueCommands.PRINT, f"Enabling periodic HK for Battery"))
cmd_tuple = enable_periodic_hk_command_with_interval(
diag=False,
sid=make_sid(BPX_HANDLER_ID, BpxSetIds.GET_HK_SET),
interval_seconds=10.0,
ssc=0,
)
for cmd in cmd_tuple:
tc_queue.appendleft(cmd.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 120.0))
tc_queue.appendleft((QueueCommands.PRINT, "Disabling periodic HK for Battery"))
tc_queue.appendleft(
disable_periodic_hk_command(
diag=False, sid=make_sid(BPX_HANDLER_ID, BpxSetIds.GET_HK_SET), ssc=0
).pack_command_tuple()
)
pass