get commanded dipole service 8 hook wip
This commit is contained in:
parent
3e466f06ef
commit
4d2b7a6150
@ -18,7 +18,7 @@ TMP_1075_2_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x6])
|
|||||||
HEATER_ID = bytearray([0x54, 0x00, 0x00, 0x1])
|
HEATER_ID = bytearray([0x54, 0x00, 0x00, 0x1])
|
||||||
PCDU_HANDLER_ID = bytearray([0x44, 0x00, 0x10, 0x00])
|
PCDU_HANDLER_ID = bytearray([0x44, 0x00, 0x10, 0x00])
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytearray([0x44, 0x00, 0x10, 0x01])
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytearray([0x44, 0x00, 0x10, 0x01])
|
||||||
IMTQ_HANDLER_ID = bytearray([0x44, 0x00, 0x10, 0x14])
|
IMTQ_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x14])
|
||||||
|
|
||||||
|
|
||||||
class ObjIdIds(enum.IntEnum):
|
class ObjIdIds(enum.IntEnum):
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.core.definitions import QueueCommands
|
||||||
|
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.pus_tc.base import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
|
|
||||||
|
|
||||||
class ImtqTestProcedure:
|
class ImtqTestProcedure:
|
||||||
@ -19,10 +19,12 @@ class ImtqTestProcedure:
|
|||||||
"""
|
"""
|
||||||
all = False
|
all = False
|
||||||
command_dipole = True
|
command_dipole = True
|
||||||
|
get_commanded_dipole = True
|
||||||
|
|
||||||
|
|
||||||
class ImtqActionIds:
|
class ImtqActionIds:
|
||||||
start_actuation_dipole = bytearray([0x0, 0x0, 0x0, 0x02])
|
start_actuation_dipole = bytearray([0x0, 0x0, 0x0, 0x02])
|
||||||
|
get_commanded_dipole = bytearray([0x0, 0x0, 0x0, 0x03])
|
||||||
|
|
||||||
|
|
||||||
def pack_imtq_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
def pack_imtq_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||||
@ -33,7 +35,13 @@ def pack_imtq_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
|||||||
|
|
||||||
if ImtqTestProcedure.all or ImtqTestProcedure.command_dipole:
|
if ImtqTestProcedure.all or ImtqTestProcedure.command_dipole:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Commanding dipole"))
|
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Commanding dipole"))
|
||||||
command = object_id + ImtqActionIds.start_adc_conversion
|
command = pack_dipole_command(object_id, 1000, 1000, 1000, 10000)
|
||||||
|
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||||
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
if ImtqTestProcedure.all or ImtqTestProcedure.get_commanded_dipole:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get commanded dipole"))
|
||||||
|
command = object_id + ImtqActionIds.get_commanded_dipole
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
from config.object_ids import ObjIdIds
|
from config.object_ids import ObjIdIds
|
||||||
|
from pus_tc.imtq import ImtqActionIds
|
||||||
|
|
||||||
|
|
||||||
def user_analyze_service_8_data(
|
def user_analyze_service_8_data(
|
||||||
@ -25,7 +26,19 @@ def user_analyze_service_8_data(
|
|||||||
data_string = data_string.rstrip(',')
|
data_string = data_string.rstrip(',')
|
||||||
data_string = data_string.rstrip()
|
data_string = data_string.rstrip()
|
||||||
content_list = [data_string]
|
content_list = [data_string]
|
||||||
|
elif object_id == ObjIdIds.IMTQ_HANDLER_ID:
|
||||||
|
return handle_imtq_replies(action_id, custom_data)
|
||||||
else:
|
else:
|
||||||
header_list = []
|
header_list = []
|
||||||
content_list = []
|
content_list = []
|
||||||
return header_list, content_list
|
return header_list, content_list
|
||||||
|
|
||||||
|
|
||||||
|
def handle_imtq_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||||
|
header_list = []
|
||||||
|
content_list = []
|
||||||
|
if action_id == ImtqActionIds.get_commanded_dipole:
|
||||||
|
header_list = ['Commanded X-Dipole', 'Commanded Y-Dipole', 'Commanded Z-Dipole']
|
||||||
|
x_dipole =
|
||||||
|
content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]]
|
||||||
|
return header_list, content_list
|
||||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
|||||||
Subproject commit 563603d0a1b03115e473768ccd203a21ebaac50c
|
Subproject commit 1773f62856f6c430c380f4c256d54a7a0b8f0a75
|
Loading…
Reference in New Issue
Block a user