rad sensor enable debug output
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
@author J. Meier
|
||||
@date 01.07.2021
|
||||
"""
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
@ -12,6 +14,13 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
class CommandIds:
|
||||
START_CONVERSIONS = 2
|
||||
READ_CONVERSIONS = 3
|
||||
ENABLE_DEBUG_OUTPUT = 4
|
||||
DISABLE_DEBUG_OUTPUT = 5
|
||||
|
||||
|
||||
def pack_rad_sensor_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
tc_queue.appendleft(
|
||||
(
|
||||
@ -37,3 +46,27 @@ def pack_rad_sensor_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
|
||||
mode_data = pack_mode_data(object_id, 0, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Start conversions"))
|
||||
command = object_id + struct.pack('!I', CommandIds.START_CONVERSIONS)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Read conversions"))
|
||||
command = object_id + struct.pack('!I', CommandIds.READ_CONVERSIONS)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Enable debug output"))
|
||||
command = object_id + struct.pack('!I', CommandIds.ENABLE_DEBUG_OUTPUT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "6":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Disable debug output"))
|
||||
command = object_id + struct.pack('!I', CommandIds.DISABLE_DEBUG_OUTPUT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
Reference in New Issue
Block a user