unify core module
This commit is contained in:
parent
efa778c0e8
commit
d48e86f5fe
@ -37,7 +37,7 @@ from eive_tmtc.tmtc.acs.reaction_wheels import (
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import pack_rad_sensor_test_into
|
||||
from eive_tmtc.tmtc.payload.ploc_memory_dumper import pack_ploc_memory_dumper_cmd
|
||||
from eive_tmtc.pus_tc.devs.ccsds_handler import pack_ccsds_handler_test
|
||||
from eive_tmtc.pus_tc.system.core import pack_core_commands
|
||||
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.pus_tc.devs.gps import pack_gps_command
|
||||
|
@ -21,7 +21,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import *
|
||||
import eive_tmtc.config.object_ids as oids
|
||||
from eive_tmtc.pus_tc.system.tcs import OpCodes as TcsOpCodes
|
||||
from eive_tmtc.pus_tc.devs.bpx_batt import BpxSetIds
|
||||
from eive_tmtc.pus_tc.system.core import SetIds as CoreSetIds
|
||||
from eive_tmtc.tmtc.core import SetIds as CoreSetIds
|
||||
from eive_tmtc.tmtc.power.common_power import SetIds as GsSetIds
|
||||
from eive_tmtc.pus_tc.devs.rad_sensor import SetIds as RadSetIds
|
||||
from eive_tmtc.pus_tc.devs.mgms import MgmLis3SetIds as MgmLis3SetIds_0_2
|
||||
|
@ -32,7 +32,7 @@ from eive_tmtc.tmtc.acs.imtq import (
|
||||
handle_raw_mtm_measurement,
|
||||
)
|
||||
from eive_tmtc.pus_tm.defs import FsfwTmTcPrinter
|
||||
from eive_tmtc.pus_tm.system.core import handle_core_hk_data
|
||||
from eive_tmtc.tmtc.core import handle_core_hk_data
|
||||
from eive_tmtc.pus_tm.devs.mgms import handle_mgm_hk_data
|
||||
import eive_tmtc.config.object_ids as obj_ids
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.pus_tc.system.core import SetIds
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
|
||||
def handle_core_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(temperature, ps_voltage, pl_voltage) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
printout = (
|
||||
f"Chip Temperature [°C] {temperature} | PS Voltage [mV] {ps_voltage} | "
|
||||
f"PL Voltage [mV] {pl_voltage}"
|
||||
)
|
||||
pw.dlog(printout)
|
||||
printer.print_validity_buffer(validity_buffer=hk_data[inc_len:], num_vars=3)
|
@ -1,4 +1,7 @@
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from spacepackets.ecss import PusTelecommand
|
||||
@ -10,7 +13,7 @@ from tmtccmd.logging import get_console_logger
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
|
||||
from eive_tmtc.config.object_ids import CORE_CONTROLLER_ID
|
||||
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
@ -333,3 +336,19 @@ def perform_reboot_cmd(
|
||||
user_data=tc_data,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def handle_core_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
|
||||
if set_id == SetIds.HK:
|
||||
pw = PrintWrapper(printer)
|
||||
fmt_str = "!fff"
|
||||
inc_len = struct.calcsize(fmt_str)
|
||||
(temperature, ps_voltage, pl_voltage) = struct.unpack(
|
||||
fmt_str, hk_data[0 : 0 + inc_len]
|
||||
)
|
||||
printout = (
|
||||
f"Chip Temperature [°C] {temperature} | PS Voltage [mV] {ps_voltage} | "
|
||||
f"PL Voltage [mV] {pl_voltage}"
|
||||
)
|
||||
pw.dlog(printout)
|
||||
printer.print_validity_buffer(validity_buffer=hk_data[inc_len:], num_vars=3)
|
||||
|
@ -43,7 +43,7 @@ SEQ_FILE_DICT = {
|
||||
MANUAL_INPUT: ["manual input", ""],
|
||||
"2": [f"16QRM On Carrier 200 MBd ({SEQ_FILE_NAMES[0]})", f"{SEQ_FILE_NAMES[0]}"],
|
||||
"3": [f"QPSK On Carrier 780 MBd ({SEQ_FILE_NAMES[1]})", f"{SEQ_FILE_NAMES[1]}"],
|
||||
"4": [f"Maximum Bandwidth QPSK ({SEQ_FILE_NAMES[2]})", f"{SEQ_FILE_NAMES[2]}"]
|
||||
"4": [f"Maximum Bandwidth QPSK ({SEQ_FILE_NAMES[2]})", f"{SEQ_FILE_NAMES[2]}"],
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user