add TMP1075 HK handling
This commit is contained in:
parent
65a2d40614
commit
96136106c7
@ -70,7 +70,7 @@ class CustomServiceList(str, enum.Enum):
|
||||
TIME = "time"
|
||||
PROCEDURE = "proc"
|
||||
RTD = "rtd"
|
||||
TMP1075 = "tcs_tmp"
|
||||
TMP1075 = "tmp1075"
|
||||
TVTTESTPROCEDURE = "tvtestproc"
|
||||
SCEX = "scex"
|
||||
TM_STORE = "tm_store"
|
||||
|
@ -13,6 +13,7 @@ from eive_tmtc.tmtc.payload.ploc_supervisor import handle_supv_hk_data
|
||||
from eive_tmtc.tmtc.acs.reaction_wheels import handle_rw_hk_data
|
||||
from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data
|
||||
from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data
|
||||
from eive_tmtc.tmtc.tcs.tmp1075 import handle_tmp_1075_hk_data
|
||||
from spacepackets.ecss import PusTelemetry
|
||||
from tmtccmd.tm.pus_3_fsfw_hk import (
|
||||
Service3Base,
|
||||
@ -171,6 +172,13 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
|
||||
return handle_str_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
|
||||
elif objb == obj_ids.PLOC_SUPV_ID:
|
||||
return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
|
||||
elif objb in [
|
||||
obj_ids.TMP1075_HANDLER_TCS_BRD_0_ID,
|
||||
obj_ids.TMP1075_HANDLER_TCS_BRD_1_ID,
|
||||
obj_ids.TMP1075_HANDLER_IF_BRD_ID,
|
||||
obj_ids.TMP1075_HANDLER_PLPCDU_0_ID,
|
||||
]:
|
||||
return handle_tmp_1075_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
|
||||
elif objb == obj_ids.ACS_CONTROLLER:
|
||||
return handle_acs_ctrl_hk_data(
|
||||
pw=pw, set_id=set_id, hk_data=hk_data, packet_time=packet_dt
|
||||
|
@ -5,3 +5,4 @@ from .time import add_time_cmds
|
||||
from .health import add_health_cmd_defs
|
||||
from .system import add_system_cmd_defs
|
||||
from .tm_store import add_persistent_tm_store_cmd_defs
|
||||
from .tcs import add_tmp_sens_cmds
|
||||
|
@ -1 +1,2 @@
|
||||
from .tm import * # noqa
|
||||
from .tmp1075 import add_tmp_sens_cmds
|
||||
|
@ -6,14 +6,17 @@
|
||||
@date 06.01.2021
|
||||
"""
|
||||
import enum
|
||||
import struct
|
||||
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
TmtcDefinitionWrapper,
|
||||
OpCodeEntry,
|
||||
)
|
||||
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
|
||||
from tmtccmd.tc import DefaultPusQueueHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid
|
||||
@ -76,3 +79,10 @@ def add_tmp_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(OpCode.NML, Info.NML)
|
||||
oce.add(OpCode.HK, Info.HK)
|
||||
defs.add_service(CustomServiceList.TMP1075.value, "TMP1075 Temperature Sensor", oce)
|
||||
|
||||
|
||||
def handle_tmp_1075_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
|
||||
if set_id == SetId.TEMPERATURE:
|
||||
temp = struct.unpack("!f", hk_data[0:4])[0]
|
||||
pw.dlog(f"TMP1075 Temperature: {temp}")
|
||||
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[4:], 1))
|
||||
|
Loading…
Reference in New Issue
Block a user