Compare commits
53 Commits
v4.0.0
...
5f44cb96be
Author | SHA1 | Date | |
---|---|---|---|
5f44cb96be | |||
96136106c7 | |||
65a2d40614 | |||
7e5539ee05 | |||
698cdb3e1d | |||
91ea3669af | |||
dcf1483c47 | |||
0ad0dc391d | |||
774a291f8c | |||
f27333fa0d | |||
5083c9390c | |||
bb4cc59049 | |||
23e38990a3 | |||
8bbd37cf76 | |||
95511e484e | |||
276862fa6e | |||
4a5c2cdd4f | |||
be09b3475d | |||
8927949c4b | |||
acc58ebef1 | |||
7bc344755f | |||
bde17600af | |||
0b1aff220c | |||
cfbff77da8 | |||
673af7f097 | |||
6f5e70dce2 | |||
9b337d3077 | |||
b333ffe707 | |||
736c12a2f8 | |||
773cf59632 | |||
a3d6fa36e9 | |||
4043e30d34 | |||
0276d3dab4 | |||
1c59ff41c1 | |||
1c1af2c7c7 | |||
d74c3fc241 | |||
2b26f1b106 | |||
9e87142324 | |||
5c903d5b02 | |||
92b0b4189c | |||
8b99fbdc81 | |||
74f090833e | |||
a89ecbf6d7 | |||
5d17a1c2b3 | |||
c7a7ca9f79 | |||
3b34d70c23 | |||
45bd838a13 | |||
ba1bead5ad | |||
dbbd22960e | |||
4603329cf7 | |||
9374e9eaab | |||
b6a88ef08e | |||
fbe54e1a2b |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -10,7 +10,13 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
# [v4.0.0] to be released
|
# [v4.1.0] 2023-06-14
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Some BPX battery commands
|
||||||
|
|
||||||
|
# [v4.0.0] 2023-06-10
|
||||||
|
|
||||||
`tmtccmd` version: v5.0.0rc0
|
`tmtccmd` version: v5.0.0rc0
|
||||||
|
|
||||||
@@ -25,6 +31,12 @@ list yields a list of all related PRs for each release.
|
|||||||
- Fix for PLOC power switching.
|
- Fix for PLOC power switching.
|
||||||
- Bump `tmtccmd` to v5.0.0rc0 for important bugfix in CFDP header.
|
- Bump `tmtccmd` to v5.0.0rc0 for important bugfix in CFDP header.
|
||||||
|
|
||||||
|
# [v3.1.2] 2023-06-19
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Pin `tmtccmd` to v4.1.3 to enforce correct `spacepackets` version on install
|
||||||
|
|
||||||
# [v3.1.1] 2023-04-17
|
# [v3.1.1] 2023-04-17
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
9
automation/Dockerfile
Normal file
9
automation/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM python:3
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get --yes upgrade
|
||||||
|
#tzdata is a dependency, won't install otherwise
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
#pip needs a valid user to work
|
||||||
|
RUN adduser --uid 114 jenkins
|
14
automation/Jenkinsfile
vendored
Normal file
14
automation/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'eive-tmtc-ci:d2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Package') {
|
||||||
|
steps {
|
||||||
|
sh 'pip install .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,11 +1,11 @@
|
|||||||
__version__ = "4.0.0"
|
__version__ = "4.1.0"
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
SW_NAME = "eive-tmtc"
|
SW_NAME = "eive-tmtc"
|
||||||
VERSION_MAJOR = 4
|
VERSION_MAJOR = 4
|
||||||
VERSION_MINOR = 0
|
VERSION_MINOR = 1
|
||||||
VERSION_REVISION = 0
|
VERSION_REVISION = 0
|
||||||
|
|
||||||
EIVE_TMTC_ROOT = Path(__file__).parent
|
EIVE_TMTC_ROOT = Path(__file__).parent
|
||||||
|
@@ -70,7 +70,7 @@ class CustomServiceList(str, enum.Enum):
|
|||||||
TIME = "time"
|
TIME = "time"
|
||||||
PROCEDURE = "proc"
|
PROCEDURE = "proc"
|
||||||
RTD = "rtd"
|
RTD = "rtd"
|
||||||
TMP1075 = "tcs_tmp"
|
TMP1075 = "tmp1075"
|
||||||
TVTTESTPROCEDURE = "tvtestproc"
|
TVTTESTPROCEDURE = "tvtestproc"
|
||||||
SCEX = "scex"
|
SCEX = "scex"
|
||||||
TM_STORE = "tm_store"
|
TM_STORE = "tm_store"
|
||||||
|
@@ -34,6 +34,7 @@ HEATER_CONTROLLER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
|||||||
TMP1075_HANDLER_TCS_BRD_0_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
TMP1075_HANDLER_TCS_BRD_0_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
||||||
TMP1075_HANDLER_TCS_BRD_1_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
TMP1075_HANDLER_TCS_BRD_1_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
||||||
TMP1075_HANDLER_PLPCDU_0_ID = bytes([0x44, 0x42, 0x00, 0x06])
|
TMP1075_HANDLER_PLPCDU_0_ID = bytes([0x44, 0x42, 0x00, 0x06])
|
||||||
|
TMP1075_HANDLER_PLPCDU_1_ID = bytes([0x44, 0x42, 0x00, 0x07])
|
||||||
TMP1075_HANDLER_IF_BRD_ID = bytes([0x44, 0x42, 0x00, 0x08])
|
TMP1075_HANDLER_IF_BRD_ID = bytes([0x44, 0x42, 0x00, 0x08])
|
||||||
|
|
||||||
# Communication Object IDs
|
# Communication Object IDs
|
||||||
|
@@ -106,6 +106,7 @@ def handle_default_procedure( # noqa C901: Complexity okay here.
|
|||||||
"0": ("TMP1075 TCS Board 0", TMP1075_HANDLER_TCS_BRD_0_ID),
|
"0": ("TMP1075 TCS Board 0", TMP1075_HANDLER_TCS_BRD_0_ID),
|
||||||
"1": ("TMP1075 TCS Board 1", TMP1075_HANDLER_TCS_BRD_1_ID),
|
"1": ("TMP1075 TCS Board 1", TMP1075_HANDLER_TCS_BRD_1_ID),
|
||||||
"2": ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID),
|
"2": ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID),
|
||||||
|
"3": ("TMP1075 PL PCDU 1", oids.TMP1075_HANDLER_PLPCDU_1_ID),
|
||||||
"4": ("TMP1075 IF Board", TMP1075_HANDLER_IF_BRD_ID),
|
"4": ("TMP1075 IF Board", TMP1075_HANDLER_IF_BRD_ID),
|
||||||
}
|
}
|
||||||
input_helper = InputHelper(menu_dict)
|
input_helper = InputHelper(menu_dict)
|
||||||
|
@@ -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.acs.reaction_wheels import handle_rw_hk_data
|
||||||
from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_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 import handle_thermal_controller_hk_data
|
||||||
|
from eive_tmtc.tmtc.tcs.tmp1075 import handle_tmp_1075_hk_data
|
||||||
from spacepackets.ecss import PusTelemetry
|
from spacepackets.ecss import PusTelemetry
|
||||||
from tmtccmd.tm.pus_3_fsfw_hk import (
|
from tmtccmd.tm.pus_3_fsfw_hk import (
|
||||||
Service3Base,
|
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)
|
return handle_str_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
|
||||||
elif objb == obj_ids.PLOC_SUPV_ID:
|
elif objb == obj_ids.PLOC_SUPV_ID:
|
||||||
return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
|
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:
|
elif objb == obj_ids.ACS_CONTROLLER:
|
||||||
return handle_acs_ctrl_hk_data(
|
return handle_acs_ctrl_hk_data(
|
||||||
pw=pw, set_id=set_id, hk_data=hk_data, packet_time=packet_dt
|
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 .health import add_health_cmd_defs
|
||||||
from .system import add_system_cmd_defs
|
from .system import add_system_cmd_defs
|
||||||
from .tm_store import add_persistent_tm_store_cmd_defs
|
from .tm_store import add_persistent_tm_store_cmd_defs
|
||||||
|
from .tcs import add_tmp_sens_cmds
|
||||||
|
@@ -28,18 +28,30 @@ class BpxSetId(enum.IntEnum):
|
|||||||
class BpxActionId:
|
class BpxActionId:
|
||||||
REBOOT = 2
|
REBOOT = 2
|
||||||
RESET_COUNTERS = 3
|
RESET_COUNTERS = 3
|
||||||
SET_CFG = 4
|
CONFIG_CMD = 4
|
||||||
GET_CFG = 5
|
GET_CFG = 5
|
||||||
|
SET_CFG = 6
|
||||||
|
MAN_HEATER_ON = 10
|
||||||
|
MAN_HEATER_OFF = 11
|
||||||
|
|
||||||
|
|
||||||
|
class BpxHeaterModeSelect(enum.IntEnum):
|
||||||
|
OFF = 0
|
||||||
|
AUTO = 1
|
||||||
|
|
||||||
|
|
||||||
class BpxOpCode:
|
class BpxOpCode:
|
||||||
HK = ["0", "hk"]
|
HK = "hk"
|
||||||
OFF = ["off"]
|
OFF = "off"
|
||||||
ON = ["on"]
|
ON = "on"
|
||||||
RST_BOOT_CNT = ["1", "rst_boot_cnt"]
|
RST_CFG = "reset_cfg"
|
||||||
REQUEST_CFG = ["2", "cfg"]
|
SET_CFG = "set_cfg"
|
||||||
REQUEST_CFG_HK = ["3", "cfg_hk"]
|
MAN_HEATER_ON = "man_heater_on"
|
||||||
REBOOT = ["4", "reboot"]
|
MAN_HEATER_OFF = "man_heater_off"
|
||||||
|
RST_BOOT_CNT = "rst_boot_cnt"
|
||||||
|
REQUEST_CFG = "cfg"
|
||||||
|
REQUEST_CFG_HK = "cfg_hk"
|
||||||
|
REBOOT = "reboot"
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
@@ -49,6 +61,10 @@ def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(keys=BpxOpCode.OFF, info="Off command")
|
oce.add(keys=BpxOpCode.OFF, info="Off command")
|
||||||
oce.add(keys=BpxOpCode.HK, info="Request BPX HK")
|
oce.add(keys=BpxOpCode.HK, info="Request BPX HK")
|
||||||
oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count")
|
oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count")
|
||||||
|
oce.add(keys=BpxOpCode.RST_CFG, info="Reset Config to stored default settings")
|
||||||
|
oce.add(keys=BpxOpCode.SET_CFG, info="Set BPX configuration")
|
||||||
|
oce.add(keys=BpxOpCode.MAN_HEATER_ON, info="Manual heater on")
|
||||||
|
oce.add(keys=BpxOpCode.MAN_HEATER_OFF, info="Manual heater off")
|
||||||
oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
|
oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
|
||||||
oce.add(
|
oce.add(
|
||||||
keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
|
keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
|
||||||
@@ -62,14 +78,14 @@ def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
|||||||
|
|
||||||
|
|
||||||
@service_provider(CustomServiceList.BPX_BATTERY.value)
|
@service_provider(CustomServiceList.BPX_BATTERY.value)
|
||||||
def pack_bpx_commands(p: ServiceProviderParams):
|
def pack_bpx_commands(p: ServiceProviderParams): # noqa C901: Complexity is okay here.
|
||||||
op_code = p.op_code
|
op_code = p.op_code
|
||||||
q = p.queue_helper
|
q = p.queue_helper
|
||||||
if op_code in BpxOpCode.HK:
|
if op_code == BpxOpCode.HK:
|
||||||
q.add_log_cmd("Requesting BPX battery HK set")
|
q.add_log_cmd("Requesting BPX battery HK set")
|
||||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_HK_SET)
|
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_HK_SET)
|
||||||
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||||
if op_code in BpxOpCode.OFF:
|
if op_code == BpxOpCode.OFF:
|
||||||
q.add_log_cmd("Off mode")
|
q.add_log_cmd("Off mode")
|
||||||
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.OFF, 0)
|
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.OFF, 0)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
@@ -79,7 +95,7 @@ def pack_bpx_commands(p: ServiceProviderParams):
|
|||||||
app_data=mode_cmd,
|
app_data=mode_cmd,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in BpxOpCode.ON:
|
if op_code == BpxOpCode.ON:
|
||||||
q.add_log_cmd("On mode")
|
q.add_log_cmd("On mode")
|
||||||
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.ON, 0)
|
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.ON, 0)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
@@ -89,27 +105,71 @@ def pack_bpx_commands(p: ServiceProviderParams):
|
|||||||
app_data=mode_cmd,
|
app_data=mode_cmd,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in BpxOpCode.RST_BOOT_CNT:
|
if op_code == BpxOpCode.RST_BOOT_CNT:
|
||||||
q.add_log_cmd("Resetting reboot counters")
|
q.add_log_cmd("Resetting reboot counters")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
create_action_cmd(
|
create_action_cmd(
|
||||||
object_id=BPX_HANDLER_ID, action_id=BpxActionId.RESET_COUNTERS
|
object_id=BPX_HANDLER_ID, action_id=BpxActionId.RESET_COUNTERS
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in BpxOpCode.REQUEST_CFG:
|
if op_code == BpxOpCode.RST_CFG:
|
||||||
|
q.add_log_cmd("Reset BPX configuration")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
object_id=BPX_HANDLER_ID, action_id=BpxActionId.CONFIG_CMD
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == BpxOpCode.SET_CFG:
|
||||||
|
q.add_log_cmd("Setting BPX configuration")
|
||||||
|
user_data = bytearray()
|
||||||
|
batt_mode = BpxHeaterModeSelect(
|
||||||
|
int(input("BPX heater mode select, 0 for OFF 1 for AUTO: "))
|
||||||
|
)
|
||||||
|
user_data.append(batt_mode)
|
||||||
|
lower_limit = int(input("Lower heater limit (-2 default): "))
|
||||||
|
user_data.append(struct.pack("!b", lower_limit)[0])
|
||||||
|
upper_limit = int(input("Upper heater limit (3 default): "))
|
||||||
|
user_data.append(struct.pack("!b", upper_limit)[0])
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
object_id=BPX_HANDLER_ID,
|
||||||
|
action_id=BpxActionId.SET_CFG,
|
||||||
|
user_data=user_data,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == BpxOpCode.REQUEST_CFG:
|
||||||
q.add_log_cmd("Requesting configuration struct")
|
q.add_log_cmd("Requesting configuration struct")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.GET_CFG)
|
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.GET_CFG)
|
||||||
)
|
)
|
||||||
if op_code in BpxOpCode.REQUEST_CFG_HK:
|
if op_code == BpxOpCode.REQUEST_CFG_HK:
|
||||||
q.add_log_cmd("Requesting configuration struct HK")
|
q.add_log_cmd("Requesting configuration struct HK")
|
||||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_CFG_SET)
|
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_CFG_SET)
|
||||||
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||||
if op_code in BpxOpCode.REBOOT:
|
if op_code == BpxOpCode.REBOOT:
|
||||||
q.add_log_cmd("Rebooting BPX battery")
|
q.add_log_cmd("Rebooting BPX battery")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.REBOOT)
|
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.REBOOT)
|
||||||
)
|
)
|
||||||
|
if op_code == BpxOpCode.MAN_HEATER_ON:
|
||||||
|
q.add_log_cmd("BPX manual heater on with seconds burntime")
|
||||||
|
burn_time = int(input("BPX heater burn time in seconds [1-65535]: "))
|
||||||
|
if burn_time < 1 or burn_time > 65535:
|
||||||
|
raise ValueError("Invalid burntime, smaller than 0 or larger than 65535")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
object_id=BPX_HANDLER_ID,
|
||||||
|
action_id=BpxActionId.MAN_HEATER_ON,
|
||||||
|
user_data=struct.pack("!H", burn_time),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == BpxOpCode.MAN_HEATER_OFF:
|
||||||
|
q.add_log_cmd("BPX manual heater off")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
object_id=BPX_HANDLER_ID, action_id=BpxActionId.MAN_HEATER_OFF
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
HEADER_LIST = [
|
HEADER_LIST = [
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
from .tm import * # noqa
|
from .tm import * # noqa
|
||||||
|
from .tmp1075 import add_tmp_sens_cmds
|
||||||
|
@@ -6,14 +6,17 @@
|
|||||||
@date 06.01.2021
|
@date 06.01.2021
|
||||||
"""
|
"""
|
||||||
import enum
|
import enum
|
||||||
|
import struct
|
||||||
|
|
||||||
from eive_tmtc.config.definitions import CustomServiceList
|
from eive_tmtc.config.definitions import CustomServiceList
|
||||||
|
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
from tmtccmd.config.tmtc import (
|
from tmtccmd.config.tmtc import (
|
||||||
tmtc_definitions_provider,
|
tmtc_definitions_provider,
|
||||||
TmtcDefinitionWrapper,
|
TmtcDefinitionWrapper,
|
||||||
OpCodeEntry,
|
OpCodeEntry,
|
||||||
)
|
)
|
||||||
|
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data
|
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
|
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.NML, Info.NML)
|
||||||
oce.add(OpCode.HK, Info.HK)
|
oce.add(OpCode.HK, Info.HK)
|
||||||
defs.add_service(CustomServiceList.TMP1075.value, "TMP1075 Temperature Sensor", oce)
|
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))
|
||||||
|
Binary file not shown.
BIN
filetest/fake_10kb.bin
Normal file
BIN
filetest/fake_10kb.bin
Normal file
Binary file not shown.
BIN
filetest/fake_20kb.bin
Normal file
BIN
filetest/fake_20kb.bin
Normal file
Binary file not shown.
BIN
filetest/fake_2_5kb.bin
Normal file
BIN
filetest/fake_2_5kb.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user