heater print adaption

This commit is contained in:
Jakob Meier 2021-02-11 08:18:42 +01:00
parent cf5ca54fbe
commit 4433fb68ac
4 changed files with 20 additions and 14 deletions

View File

@ -5,7 +5,7 @@
@author J. Meier
@date 30.01.2021
"""
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
@ -14,8 +14,8 @@ class TestProcedure:
"""
@brief The variables in this class can be used to configure the heater test procedure.
"""
on = True # All heaters will be turned on
off = False # All heaters will be turned off
on = False # All heaters will be turned on
off = True # All heaters will be turned off
class SwitchNumbers:
@ -32,15 +32,15 @@ class ActionIds:
def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
tc_queue.appendleft(("print", "Testing Heater Switching"))
tc_queue.appendleft((QueueCommands.PRINT, "Testing Heater Switching"))
if TestProcedure.on:
tc_queue.appendleft(("print", "Switching on heater of payload camera"))
tc_queue.appendleft((QueueCommands.PRINT, "Switching on heater of payload camera"))
command = pack_switch_heater_command(object_id, SwitchNumbers.PAYLOAD_CAMERA_HEATER, SwitchActions.ON)
command = PusTelecommand(service=8, subservice=128, ssc=300, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if TestProcedure.off:
tc_queue.appendleft(("print", "Switching off heater of payload camera"))
tc_queue.appendleft((QueueCommands.PRINT, "Switching off heater of payload camera"))
command = pack_switch_heater_command(object_id, SwitchNumbers.PAYLOAD_CAMERA_HEATER, SwitchActions.OFF)
command = PusTelecommand(service=8, subservice=128, ssc=301, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())

View File

@ -24,15 +24,15 @@ class PDU2TestProcedure:
read_gnd_wdt = False
gnd_wdt_reset = False
ping = False
channel_2_off = False # TCS Heater
read_temperature = False
read_channel_2_state = False # TCS Heater
channel_2_off = False # Reaction wheels 5V
read_temperature = True
read_channel_2_state = False # Reaction wheels 5V
read_cur_lu_lim_0 = False # OBC
channel_2_on = False # TCS Heater
channel_2_on = False # Reaction wheels 5V
invalid_table_id_test = False # Test to check if software properly handles invalid table ids
invalid_address_test = False # Test to check if software properly handles invalid addresses
invalid_parameter_size_test = False
request_hk_table = True
request_hk_table = False
def pack_pdu2_test_into(pdu2_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:

View File

@ -23,8 +23,15 @@ def user_analyze_service_8_data(
@return:
"""
if object_id.value == ObjectIds.PDU2_HANDLER_ID.value:
header_list = ['Housekeeping Table']
content_list = [custom_data]
header_list = ['PDU2 Service 8 Reply']
data_string = str()
for index in range(len(custom_data)):
data_string += str(hex(custom_data[index])) + " , "
data_string = data_string.rstrip()
data_string = data_string.rstrip(',')
data_string = data_string.rstrip()
content_list = [data_string]
else:
header_list = []
content_list = []

View File

@ -22,7 +22,6 @@ def tm_user_factory_hook(raw_tm_packet: bytearray) -> PusTelemetry:
return Service5TM(raw_tm_packet)
if service_type == 8:
service8tm = Service8TM(raw_tm_packet)
service8tm.print_source_data()
return Service8TM(raw_tm_packet)
if service_type == 17:
return Service17TM(raw_tm_packet)