Update to v1.6.1 #5
@ -35,7 +35,7 @@ def pack_imtq_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
|
||||
if ImtqTestProcedure.all or ImtqTestProcedure.command_dipole:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Commanding dipole"))
|
||||
command = pack_dipole_command(object_id, 1000, 1000, 1000, 10000)
|
||||
command = pack_dipole_command(object_id, 2000, 2000, 2000, 10000)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import struct
|
||||
from typing import Tuple
|
||||
from config.object_ids import ObjIdIds
|
||||
from pus_tc.imtq import ImtqActionIds
|
||||
@ -37,8 +38,10 @@ def user_analyze_service_8_data(
|
||||
def handle_imtq_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||
header_list = []
|
||||
content_list = []
|
||||
if action_id == ImtqActionIds.get_commanded_dipole:
|
||||
if action_id == struct.unpack('!I', ImtqActionIds.get_commanded_dipole)[0]:
|
||||
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]]
|
||||
x_dipole = struct.unpack('!H', custom_data[:2])
|
||||
y_dipole = struct.unpack('!H', custom_data[2:4])
|
||||
z_dipole = struct.unpack('!H', custom_data[4:6])
|
||||
content_list = [x_dipole[0], y_dipole[0], z_dipole[0]]
|
||||
return header_list, content_list
|
||||
|
Loading…
Reference in New Issue
Block a user