make syrlinks hk a bit more readable

This commit is contained in:
Robin Müller 2023-01-18 15:52:35 +01:00
parent 8001156a02
commit c9790911ef
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 12 additions and 12 deletions

View File

@ -39,7 +39,7 @@ from eive_tmtc.tmtc.payload.ploc_memory_dumper import pack_ploc_memory_dumper_cm
from eive_tmtc.pus_tc.devs.ccsds_handler import pack_ccsds_handler_test
from eive_tmtc.tmtc.core import pack_core_commands
from eive_tmtc.pus_tc.devs.star_tracker import pack_star_tracker_commands
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import pack_syrlinks_command
from eive_tmtc.tmtc.syrlinks_hk_handler import pack_syrlinks_command
from eive_tmtc.pus_tc.devs.gps import pack_gps_command
from eive_tmtc.tmtc.acs.acs_board import pack_acs_command
from eive_tmtc.pus_tc.devs.plpcdu import pack_pl_pcdu_commands

View File

@ -26,7 +26,7 @@ from eive_tmtc.pus_tc.devs.mgms import MgmLis3SetId as MgmLis3SetIds_0_2
from eive_tmtc.pus_tc.devs.mgms import MgmRm3100SetId as MgmRm3100SetIds_1_3
from eive_tmtc.pus_tc.devs.gyros import AdisGyroSetId as AdisGyroSetIds_0_2
from eive_tmtc.pus_tc.devs.gyros import L3gGyroSetId as L3gGyroSetIds_1_3
from eive_tmtc.pus_tc.devs.syrlinks_hk_handler import SetId as SyrlinksSetIds
from eive_tmtc.tmtc.syrlinks_hk_handler import SetId as SyrlinksSetIds
from eive_tmtc.pus_tc.devs.gps import SetId as GpsSetIds
from eive_tmtc.tmtc.acs.imtq import ImtqSetId
from eive_tmtc.pus_tc.devs.sus import SetId

View File

@ -210,12 +210,12 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
"RX Datarate",
]
rx_status = hk_data[0]
rx_sensitivity = struct.unpack("!I", hk_data[1:5])
rx_frequency_shift = struct.unpack("!I", hk_data[5:9])
rx_iq_power = struct.unpack("!H", hk_data[9:11])
rx_agc_value = struct.unpack("!H", hk_data[11:13])
rx_demod_eb = struct.unpack("!I", hk_data[13:17])
rx_demod_n0 = struct.unpack("!I", hk_data[17:21])
rx_sensitivity = struct.unpack("!I", hk_data[1:5])[0]
rx_frequency_shift = struct.unpack("!I", hk_data[5:9])[0]
rx_iq_power = struct.unpack("!H", hk_data[9:11])[0]
rx_agc_value = struct.unpack("!H", hk_data[11:13])[0]
rx_demod_eb = struct.unpack("!I", hk_data[13:17])[0]
rx_demod_n0 = struct.unpack("!I", hk_data[17:21])[0]
rx_data_rate = hk_data[21]
content_list = [
rx_status,
@ -228,8 +228,8 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
rx_data_rate,
]
validity_buffer = hk_data[22:]
pw.dlog(str(header_list))
pw.dlog(str(content_list))
for header, content in zip(header_list, content_list):
pw.dlog(f"{header}: {content}")
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=8)
@ -244,6 +244,6 @@ def handle_syrlinks_tx_registers_dataset(
tx_agc_value = struct.unpack("!H", hk_data[2:4])
content_list = [tx_status, tx_waveform, tx_agc_value]
validity_buffer = hk_data[4:]
pw.dlog(str(header_list))
pw.dlog(str(content_list))
for header, content in zip(header_list, content_list):
pw.dlog(f"{header}: {content}")
printer.print_validity_buffer(validity_buffer=validity_buffer, num_vars=3)