Added TCs to command Thermal Controller (to be continued)

This commit is contained in:
2022-05-17 10:41:45 +02:00
parent a681850248
commit aadbfb2594
8 changed files with 77 additions and 17 deletions

View File

@ -0,0 +1,35 @@
from tmtccmd.tc.definitions import TcQueueT, QueueCommands
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from .common import command_mode
import config.object_ids as obj_ids
class OpCodes:
THERMAL_CONTROLLER_NORMAL = ["0", "thermal-normal"]
THERMAL_CONTROLLER_OFF = ["1", "thermal-off"]
class Info:
THERMAL_CONTROLLER_NORMAL = "Switching Thermal Controller into normal"
THERMAL_CONTROLLER_OFF = "Switching Thermal Controller off"
def pack_controller_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.THERMAL_CONTROLLER_NORMAL:
command_mode(
object_id=obj_ids.THERMAL_CONTROLLER_ID,
mode=Modes.NORMAL,
submode=0,
tc_queue=tc_queue,
info=Info.THERMAL_CONTROLLER_NORMAL,
)
if op_code in OpCodes.THERMAL_CONTROLLER_OFF:
command_mode(
object_id=obj_ids.THERMAL_CONTROLLER_ID,
mode=Modes.OFF,
submode=0,
tc_queue=tc_queue,
info=Info.THERMAL_CONTROLLER_OFF,
)