added tcs board commands

This commit is contained in:
2021-10-12 17:50:20 +02:00
parent 56f1ca2ef8
commit 423f1fbb2c
3 changed files with 33 additions and 11 deletions

View File

@ -14,12 +14,15 @@ from gomspace.gomspace_pdu_definitions import *
class Pdu1OpCodes(enum.Enum):
STAR_TRACKER_ON = "1"
SUS_NOMINAL_ON = "3"
TESTS = "0"
TCS_BOARD_ON = "1"
TCS_BOARD_OFF = "2"
STAR_TRACKER_ON = "3"
STAR_TRACKER_OFF = "4"
SUS_NOMINAL_OFF = "5"
ACS_A_SIDE_ON = "6"
ACS_A_SIDE_OFF = "7"
SUS_NOMINAL_ON = "5"
SUS_NOMINAL_OFF = "6"
ACS_A_SIDE_ON = "7"
ACS_A_SIDE_OFF = "8"
class PDU1TestProcedure:
@ -41,10 +44,26 @@ class PDU1TestProcedure:
def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
if op_code == Pdu1OpCodes.TCS_BOARD_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board on"))
command = pack_set_param_command(
object_id, PDUConfigTable.out_en_0.parameter_address,
PDUConfigTable.out_en_2.parameter_size, Channel.on
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.TCS_BOARD_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board off"))
command = pack_set_param_command(
object_id, PDUConfigTable.out_en_0.parameter_address,
PDUConfigTable.out_en_2.parameter_size, Channel.off
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.STAR_TRACKER_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on"))
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
PDUConfigTable.out_en_2.parameter_size, Channel.on)
command = pack_set_param_command(
object_id, PDUConfigTable.out_en_2.parameter_address,
PDUConfigTable.out_en_2.parameter_size, Channel.on
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))