Compare commits

...

4 Commits

Author SHA1 Message Date
0a7feff169 bump changelog 2023-01-23 17:40:27 +01:00
9b30d290a7 pin tmtccmd on v4.0.0a2 2023-01-23 17:38:14 +01:00
d23201466c syrlinks cmd updates 2023-01-23 15:35:24 +01:00
8bcee7c094 add enable/disable HK syrlinks 2023-01-23 15:04:06 +01:00
5 changed files with 40 additions and 18 deletions

View File

@@ -10,26 +10,30 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v2.4.0] 2023-01-23
- Pin `tmtccmd` to v4.0.0a2
- Unify and move Syrlinks module, some bugfixes
- Add/Re-enable handling for SUS temp packets
- Update SA deployment commands for OBSW https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/347
- Extend, fix and improve Syrlinks TMTC handling a bit
# [v2.3.0] and [v2.3.1] 18.01.2023
# [v2.3.0] and [v2.3.1] 2023-01-18
- Bumped `tmtccmd` version to new alpha release, use some new features
and fix the breaking changes
# [v2.2.0] 16.01.2023
# [v2.2.0] 2023-01-16
- A lot of consistency renaming: Single name for enums which are not flag enums,
e.g `ActionId` instead of `ActionIds`
- Updated required Python version to 3.10
# [v2.1.1] 12.01.2023
# [v2.1.1] 2023-01-12
- Typo in `setup.cfg`, missing version prefix `v` for `tmtccmd`
# [v2.1.0] 12.01.2023
# [v2.1.0] 2023-01-12
- Various refactoring and tweaks to allow easier integration into `eive-mib`.
- Handle ACS CTRL HK sets.
@@ -38,22 +42,22 @@ list yields a list of all related PRs for each release.
- Starting from now, more regular releases, especially on breaking changes. This is because
this is now also a library with dependents.
# [v2.0.2] 01.12.2022
# [v2.0.2] 2022-01-12
- Bumped dependencies, small fix to allow working script if PyQt is not installed
# [v2.0.1] 29.11.2022
# [v2.0.1] 2022-11-29
- Minor bugfix
# [v2.0.0] 29.11.2022
# [v2.0.0] 2022-11-29
- The tmtc program is installable now, which allow re-using it in other Python applications
- Bugfixes for IMTQ TM handling
- Updates S/A deployment command
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/118
# [v1.13.0] 13.10.2022
# [v1.13.0] 2022-10-13
- CFDP integration
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/113
@@ -66,7 +70,7 @@ list yields a list of all related PRs for each release.
- Update PLOC supervisor commands
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/107
# [v1.12.0] 05.07.2022
# [v1.12.0] 2022-07-05
- Update GPS HK Parsing
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/86

View File

@@ -13,7 +13,6 @@ from tmtccmd.config.tmtc import (
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc.pus_20_params import pack_scalar_boolean_parameter_app_data
from tmtccmd.tc import service_provider
from tmtccmd.tc.pus_200_fsfw_modes import Mode, pack_mode_command
from tmtccmd.tc.decorator import ServiceProviderParams
@@ -188,7 +187,7 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.SAFE))
elif op_code in OpCodes.DTBL:
q.add_log_cmd(f"{Info.DTBL}")
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.DTBL))
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.DETUMBLE))
elif op_code in OpCodes.IDLE:
q.add_log_cmd(f"{Info.IDLE}")
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.IDLE))

View File

@@ -19,6 +19,8 @@ from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid,
create_request_one_diag_command,
create_enable_periodic_hk_command_with_interval,
create_disable_periodic_hk_command,
)
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Mode
@@ -42,6 +44,8 @@ class OpCode:
SET_CW = "set_tx_carrier_wave"
MODULATION = "modulation"
HK_RX_REGS = "hk_rx_regs"
ENABLE_HK_RX_REGS = "enable_hk_rx"
DISABLE_HK_RX_REGS = "disable_hk_rx"
HK_TX_REGS = "hk_tx_regs"
TX_STATUS = "tx_status"
RX_STATUS = "rx_status"
@@ -50,6 +54,9 @@ class OpCode:
class Info:
HK_RX_REGS = "Request RX register set"
HK_TX_REGS = "Request TX register set"
ENABLE_HK_RX_REGS = "Enable periodic RX register HK"
DISABLE_HK_RX_REGS = "Disable periodic RX register HK"
EMABLE_HK_TX_REGS = "Enable periodic TX register HK"
TX_STATUS = "Read TX status (always read in normal mode)"
RX_STATUS = "Read RX status (always read in normal mode)"
SET_CW = "Set TX carrier wave"
@@ -86,6 +93,8 @@ def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.SET_CW, Info.SET_CW)
oce.add(OpCode.TX_STATUS, Info.TX_STATUS)
oce.add(OpCode.RX_STATUS, Info.RX_STATUS)
oce.add(OpCode.ENABLE_HK_RX_REGS, Info.ENABLE_HK_RX_REGS)
oce.add(OpCode.DISABLE_HK_RX_REGS, Info.DISABLE_HK_RX_REGS)
oce.add("7", "Syrlinks Handler: Read TX waveform")
oce.add("8", "Syrlinks Handler: Read TX AGC value high byte")
oce.add("9", "Syrlinks Handler: Read TX AGC value low byte")
@@ -133,6 +142,16 @@ def pack_syrlinks_command(
q.add_log_cmd(f"{prefix}: {Info.HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
q.add_pus_tc(create_request_one_diag_command(sid))
if op_code in OpCode.ENABLE_HK_RX_REGS:
q.add_log_cmd(f"{prefix}: {Info.ENABLE_HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
cmds = create_enable_periodic_hk_command_with_interval(True, sid, 2.0)
for cmd in cmds:
q.add_pus_tc(cmd)
if op_code in OpCode.DISABLE_HK_RX_REGS:
q.add_log_cmd(f"{prefix}: {Info.DISABLE_HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
q.add_pus_tc(create_disable_periodic_hk_command(True, sid))
if op_code in OpCode.HK_TX_REGS:
q.add_log_cmd(f"{prefix}: {Info.HK_TX_REGS}")
sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET)
@@ -211,7 +230,9 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
]
rx_status = hk_data[0]
rx_sensitivity = struct.unpack("!I", hk_data[1:5])[0]
rx_frequency_shift = struct.unpack("!I", hk_data[5:9])[0]
rx_frequency_shift = struct.unpack("!i", hk_data[5:9])[0]
freq_shift_hz = rx_frequency_shift / 8.0
freq_shift_printout = f"Raw: {rx_frequency_shift}, Eng: {freq_shift_hz} Hz"
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]
@@ -220,7 +241,7 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
content_list = [
rx_status,
rx_sensitivity,
rx_frequency_shift,
freq_shift_printout,
rx_iq_power,
rx_agc_value,
rx_demod_eb,

View File

@@ -41,9 +41,7 @@ class InfoSys:
OFF = "Switch TCS subsystem OFF"
NML = "Switch TCS subsystem NORMAL (nominal)"
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
REQUEST_DEVICE_TEMP_SET = (
"Request HK set of device sensor temperatures"
)
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"

View File

@@ -27,8 +27,8 @@ classifiers =
[options]
install_requires =
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@23fe1dff5e035#egg=tmtccmd
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a2
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@23fe1dff5e035#egg=tmtccmd
packages = find:
python_requires = >=3.10
include_package_data = True