Merge pull request 'ACS downwards compatibility' (#223) from acs-downwards-compat into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #223 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
cbcc06ede7
@ -10,6 +10,13 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v5.3.1] 2023-07-26
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Adaptions for ACS CTRL strategy enum to make it compatible to software. Also make it re-usable
|
||||||
|
by putting it in global scope.
|
||||||
|
|
||||||
# [v5.3.0] 2023-07-26
|
# [v5.3.0] 2023-07-26
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
__version__ = "5.3.0"
|
__version__ = "5.3.1"
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -6,7 +6,7 @@ from pathlib import Path
|
|||||||
SW_NAME = "eive-tmtc"
|
SW_NAME = "eive-tmtc"
|
||||||
VERSION_MAJOR = 5
|
VERSION_MAJOR = 5
|
||||||
VERSION_MINOR = 3
|
VERSION_MINOR = 3
|
||||||
VERSION_REVISION = 0
|
VERSION_REVISION = 1
|
||||||
|
|
||||||
EIVE_TMTC_ROOT = Path(__file__).parent
|
EIVE_TMTC_ROOT = Path(__file__).parent
|
||||||
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
|
||||||
|
@ -68,6 +68,29 @@ class ActionId(enum.IntEnum):
|
|||||||
RESTORE_MEKF_NONFINITE_RECOVERY = 2
|
RESTORE_MEKF_NONFINITE_RECOVERY = 2
|
||||||
|
|
||||||
|
|
||||||
|
CTRL_STRAT_DICT = {
|
||||||
|
0: "OFF",
|
||||||
|
1: "NO_MAG_FIELD_FOR_CONTROL",
|
||||||
|
2: "NO_SENSORS_FOR_CONTROL",
|
||||||
|
# OBSW <= v6.1.0
|
||||||
|
10: "LEGACY_SAFE_MEKF",
|
||||||
|
11: "LEGACY_WITHOUT_MEKF",
|
||||||
|
12: "LEGACY_ECLIPSE_DAMPING",
|
||||||
|
13: "LEGACY_ECLIPSE_IDELING",
|
||||||
|
# Added in OBSW v6.2.0
|
||||||
|
14: "SAFE_MEKF",
|
||||||
|
15: "SAFE_GYR",
|
||||||
|
16: "SAFE_SUSMGM",
|
||||||
|
17: "SAFE_ECLIPSE_DAMPING_GYR",
|
||||||
|
18: "SAFE_ECLIPSE_DAMPING_SUSMGM",
|
||||||
|
19: "SAFE_ECLIPSE_IDELING",
|
||||||
|
20: "DETUMBLE_FULL",
|
||||||
|
21: "DETUMBLE_DETERIORATED",
|
||||||
|
30: "PTG_MEKF",
|
||||||
|
31: "PTG_RAW",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class OpCodes:
|
class OpCodes:
|
||||||
OFF = ["off"]
|
OFF = ["off"]
|
||||||
SAFE = ["safe"]
|
SAFE = ["safe"]
|
||||||
@ -1058,21 +1081,6 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
|
|
||||||
|
|
||||||
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
ctrl_strat = {
|
|
||||||
0: "OFF",
|
|
||||||
1: "NO_MAG_FIELD_FOR_CONTROL",
|
|
||||||
2: "NO_SENSORS_FOR_CONTROL",
|
|
||||||
10: "SAFE_MEKF",
|
|
||||||
11: "SAFE_GYR",
|
|
||||||
12: "SAFE_SUSMGM",
|
|
||||||
13: "SAFE_ECLIPSE_DAMPING_GYR",
|
|
||||||
14: "SAFE_ECLIPSE_DAMPING_SUSMGM",
|
|
||||||
15: "SAFE_ECLIPSE_IDELING",
|
|
||||||
20: "DETUMBLE_FULL",
|
|
||||||
21: "DETUMBLE_DETERIORATED",
|
|
||||||
30: "PTG_MEKF",
|
|
||||||
31: "PTG_RAW",
|
|
||||||
}
|
|
||||||
pw.dlog("Received CTRL Values Set")
|
pw.dlog("Received CTRL Values Set")
|
||||||
fmt_strat = "!B"
|
fmt_strat = "!B"
|
||||||
fmt_quat = "!dddd"
|
fmt_quat = "!dddd"
|
||||||
@ -1118,8 +1126,8 @@ def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
current_idx += inc_len_vec
|
current_idx += inc_len_vec
|
||||||
if ctrl_strat.get(strat) is not None:
|
if CTRL_STRAT_DICT.get(strat) is not None:
|
||||||
pw.dlog(f"{'Safe Ctrl Strategy'.ljust(25)}: {ctrl_strat[strat]}")
|
pw.dlog(f"{'Safe Ctrl Strategy'.ljust(25)}: {CTRL_STRAT_DICT[strat]}")
|
||||||
else:
|
else:
|
||||||
pw.dlog(f"{'Safe Ctrl Strategy (key unknown)'.ljust(25)}: {strat}")
|
pw.dlog(f"{'Safe Ctrl Strategy (key unknown)'.ljust(25)}: {strat}")
|
||||||
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
|
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
|
||||||
|
Loading…
Reference in New Issue
Block a user