Compare commits
17 Commits
v2.16.2
...
783d5a8ed5
Author | SHA1 | Date | |
---|---|---|---|
783d5a8ed5 | |||
fc9b4efecf | |||
2468998dbd | |||
74e6d6fe5f | |||
cd393a1596 | |||
8747333880 | |||
77fbcede10 | |||
ba87c01f66 | |||
68c46a299f | |||
2dd850f072 | |||
c83e17bba3 | |||
e5eb2e479c | |||
d2bc142b50 | |||
9115f2519b | |||
54c78d4441 | |||
e46f685607 | |||
b0294e2764 |
@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Syrlinks ASSY object ID
|
||||||
|
|
||||||
# [v2.16.2] 2023-03-01
|
# [v2.16.2] 2023-03-01
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
@ -139,8 +139,9 @@
|
|||||||
0x73000001;ACS_BOARD_ASS
|
0x73000001;ACS_BOARD_ASS
|
||||||
0x73000002;SUS_BOARD_ASS
|
0x73000002;SUS_BOARD_ASS
|
||||||
0x73000003;TCS_BOARD_ASS
|
0x73000003;TCS_BOARD_ASS
|
||||||
0x73000004;RW_ASS
|
0x73000004;RW_ASSY
|
||||||
0x73000006;CAM_SWITCHER
|
0x73000006;CAM_SWITCHER
|
||||||
|
0x73000007;SYRLINKS_ASSY
|
||||||
0x73000100;TM_FUNNEL
|
0x73000100;TM_FUNNEL
|
||||||
0x73000101;PUS_TM_FUNNEL
|
0x73000101;PUS_TM_FUNNEL
|
||||||
0x73000102;CFDP_TM_FUNNEL
|
0x73000102;CFDP_TM_FUNNEL
|
||||||
|
|
@ -27,9 +27,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
|||||||
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
||||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
|
||||||
from tmtccmd.tc.pus_20_fsfw_param import (
|
from tmtccmd.tc.pus_20_fsfw_param import create_load_param_cmd
|
||||||
create_load_param_cmd
|
|
||||||
)
|
|
||||||
|
|
||||||
from tmtccmd.pus.s20_fsfw_param_defs import (
|
from tmtccmd.pus.s20_fsfw_param_defs import (
|
||||||
create_scalar_u8_parameter,
|
create_scalar_u8_parameter,
|
||||||
@ -67,10 +65,12 @@ class Submode(enum.IntEnum):
|
|||||||
PTG_TARGET_GS = 15
|
PTG_TARGET_GS = 15
|
||||||
PTG_INERTIAL = 16
|
PTG_INERTIAL = 16
|
||||||
|
|
||||||
|
|
||||||
class ActionId(enum.IntEnum):
|
class ActionId(enum.IntEnum):
|
||||||
SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0
|
SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0
|
||||||
RESET_MEKF = 1
|
RESET_MEKF = 1
|
||||||
|
|
||||||
|
|
||||||
class OpCodes:
|
class OpCodes:
|
||||||
OFF = ["off"]
|
OFF = ["off"]
|
||||||
SAFE = ["normal_safe"]
|
SAFE = ["normal_safe"]
|
||||||
@ -250,13 +250,21 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET))
|
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET))
|
||||||
elif op_code in OpCodes.GS:
|
elif op_code in OpCodes.GS:
|
||||||
q.add_log_cmd(f"{Info.GS}")
|
q.add_log_cmd(f"{Info.GS}")
|
||||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET_GS))
|
q.add_pus_tc(
|
||||||
|
pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET_GS)
|
||||||
|
)
|
||||||
elif op_code in OpCodes.INERTIAL:
|
elif op_code in OpCodes.INERTIAL:
|
||||||
q.add_log_cmd(f"{Info.INERTIAL}")
|
q.add_log_cmd(f"{Info.INERTIAL}")
|
||||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_INERTIAL))
|
q.add_pus_tc(
|
||||||
|
pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_INERTIAL)
|
||||||
|
)
|
||||||
elif op_code in OpCodes.SAFE_PTG:
|
elif op_code in OpCodes.SAFE_PTG:
|
||||||
q.add_log_cmd(f"{Info.SAFE_PTG}")
|
q.add_log_cmd(f"{Info.SAFE_PTG}")
|
||||||
q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL))
|
q.add_pus_tc(
|
||||||
|
create_action_cmd(
|
||||||
|
ACS_CONTROLLER, ActionId.SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL
|
||||||
|
)
|
||||||
|
)
|
||||||
elif op_code in OpCodes.RESET_MEKF:
|
elif op_code in OpCodes.RESET_MEKF:
|
||||||
q.add_log_cmd(f"{Info.RESET_MEKF}")
|
q.add_log_cmd(f"{Info.RESET_MEKF}")
|
||||||
q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.RESET_MEKF))
|
q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.RESET_MEKF))
|
||||||
@ -406,7 +414,9 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
)
|
)
|
||||||
elif op_code in OpCodes.REQUEST_MEKF_HK:
|
elif op_code in OpCodes.REQUEST_MEKF_HK:
|
||||||
q.add_log_cmd(Info.REQUEST_MEKF_HK)
|
q.add_log_cmd(Info.REQUEST_MEKF_HK)
|
||||||
q.add_pus_tc(create_request_one_diag_command(make_sid(ACS_CONTROLLER, SetId.MEKF_DATA)))
|
q.add_pus_tc(
|
||||||
|
create_request_one_diag_command(make_sid(ACS_CONTROLLER, SetId.MEKF_DATA))
|
||||||
|
)
|
||||||
elif op_code in OpCodes.ENABLE_MEKF_HK:
|
elif op_code in OpCodes.ENABLE_MEKF_HK:
|
||||||
q.add_log_cmd(Info.ENABLE_MEKF_HK)
|
q.add_log_cmd(Info.ENABLE_MEKF_HK)
|
||||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||||
@ -462,8 +472,12 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
|
|
||||||
|
|
||||||
def set_acs_ctrl_param_scalar(q: DefaultPusQueueHelper):
|
def set_acs_ctrl_param_scalar(q: DefaultPusQueueHelper):
|
||||||
pt = int(input("Specify parameter type to set {0: \"uint8\", 1: \"uint16\", 2: \"int32\", 3: \"float\", "
|
pt = int(
|
||||||
"4: \"double\"}: "))
|
input(
|
||||||
|
'Specify parameter type to set {0: "uint8", 1: "uint16", 2: "int32", 3: "float", '
|
||||||
|
'4: "double"}: '
|
||||||
|
)
|
||||||
|
)
|
||||||
sid = int(input("Specify parameter struct ID to set: "))
|
sid = int(input("Specify parameter struct ID to set: "))
|
||||||
pid = int(input("Specify parameter ID to set: "))
|
pid = int(input("Specify parameter ID to set: "))
|
||||||
match pt:
|
match pt:
|
||||||
@ -530,7 +544,7 @@ def set_acs_ctrl_param_scalar(q: DefaultPusQueueHelper):
|
|||||||
|
|
||||||
|
|
||||||
def set_acs_ctrl_param_vector(q: DefaultPusQueueHelper):
|
def set_acs_ctrl_param_vector(q: DefaultPusQueueHelper):
|
||||||
pt = int(input("Specify parameter type to set {0: \"float\", 1: \"double\"}: "))
|
pt = int(input('Specify parameter type to set {0: "float", 1: "double"}: '))
|
||||||
sid = int(input("Specify parameter struct ID to set: "))
|
sid = int(input("Specify parameter struct ID to set: "))
|
||||||
pid = int(input("Specify parameter ID to set: "))
|
pid = int(input("Specify parameter ID to set: "))
|
||||||
match pt:
|
match pt:
|
||||||
@ -538,7 +552,9 @@ def set_acs_ctrl_param_vector(q: DefaultPusQueueHelper):
|
|||||||
elms = int(input("Specify number of elements in vector to set: "))
|
elms = int(input("Specify number of elements in vector to set: "))
|
||||||
param = []
|
param = []
|
||||||
for _ in range(elms):
|
for _ in range(elms):
|
||||||
param.append(float(input("Specify parameter vector entry value to set: ")))
|
param.append(
|
||||||
|
float(input("Specify parameter vector entry value to set: "))
|
||||||
|
)
|
||||||
print(param)
|
print(param)
|
||||||
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
@ -558,7 +574,9 @@ def set_acs_ctrl_param_vector(q: DefaultPusQueueHelper):
|
|||||||
elms = int(input("Specify number of elements in vector to set: "))
|
elms = int(input("Specify number of elements in vector to set: "))
|
||||||
param = []
|
param = []
|
||||||
for _ in range(elms):
|
for _ in range(elms):
|
||||||
param.append(float(input("Specify parameter vector entry value to set: ")))
|
param.append(
|
||||||
|
float(input("Specify parameter vector entry value to set: "))
|
||||||
|
)
|
||||||
print(param)
|
print(param)
|
||||||
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
@ -577,7 +595,7 @@ def set_acs_ctrl_param_vector(q: DefaultPusQueueHelper):
|
|||||||
|
|
||||||
|
|
||||||
def set_acs_ctrl_param_matrix(q: DefaultPusQueueHelper):
|
def set_acs_ctrl_param_matrix(q: DefaultPusQueueHelper):
|
||||||
pt = int(input("Specify parameter type to set {0: \"float\", 1: \"double\"}: "))
|
pt = int(input('Specify parameter type to set {0: "float", 1: "double"}: '))
|
||||||
sid = int(input("Specify parameter struct ID to set: "))
|
sid = int(input("Specify parameter struct ID to set: "))
|
||||||
pid = int(input("Specify parameter ID to set: "))
|
pid = int(input("Specify parameter ID to set: "))
|
||||||
match pt:
|
match pt:
|
||||||
@ -588,7 +606,9 @@ def set_acs_ctrl_param_matrix(q: DefaultPusQueueHelper):
|
|||||||
param = []
|
param = []
|
||||||
for _ in range(rows):
|
for _ in range(rows):
|
||||||
for _ in range(cols):
|
for _ in range(cols):
|
||||||
row.append(float(input("Specify parameter vector entry value to set: ")))
|
row.append(
|
||||||
|
float(input("Specify parameter vector entry value to set: "))
|
||||||
|
)
|
||||||
param.append(row)
|
param.append(row)
|
||||||
print(param)
|
print(param)
|
||||||
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
if input("Confirm selected parameter values (Y/N): ") == "Y":
|
||||||
@ -612,7 +632,9 @@ def set_acs_ctrl_param_matrix(q: DefaultPusQueueHelper):
|
|||||||
param = []
|
param = []
|
||||||
for _ in range(rows):
|
for _ in range(rows):
|
||||||
for _ in range(cols):
|
for _ in range(cols):
|
||||||
row.append(float(input("Specify parameter vector entry value to set: ")))
|
row.append(
|
||||||
|
float(input("Specify parameter vector entry value to set: "))
|
||||||
|
)
|
||||||
param.append(row)
|
param.append(row)
|
||||||
row = []
|
row = []
|
||||||
print(param)
|
print(param)
|
||||||
@ -930,8 +952,15 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
|||||||
|
|
||||||
|
|
||||||
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
mekf_status = {0 : "UNINITIALIZED", 1: "NO_GYR_DATA", 2: "NO_MODEL_VECTORS", 3: "NO_SUS_MGM_STR_DATA",
|
mekf_status = {
|
||||||
4: "COVARIANCE_INVERSION_FAILED", 10: "INITIALIZED", 11: "RUNNING"}
|
0: "UNINITIALIZED",
|
||||||
|
1: "NO_GYR_DATA",
|
||||||
|
2: "NO_MODEL_VECTORS",
|
||||||
|
3: "NO_SUS_MGM_STR_DATA",
|
||||||
|
4: "COVARIANCE_INVERSION_FAILED",
|
||||||
|
10: "INITIALIZED",
|
||||||
|
11: "RUNNING",
|
||||||
|
}
|
||||||
pw.dlog("Received MEKF Set")
|
pw.dlog("Received MEKF Set")
|
||||||
fmt_quat = "!dddd"
|
fmt_quat = "!dddd"
|
||||||
fmt_str_4 = "[{:8.3f}, {:8.3f}, {:8.3f}, {:8.3f}]"
|
fmt_str_4 = "[{:8.3f}, {:8.3f}, {:8.3f}, {:8.3f}]"
|
||||||
|
@ -95,7 +95,9 @@ def handle_gyr_cmd(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
PusTelecommand(
|
PusTelecommand(
|
||||||
service=201,
|
service=201,
|
||||||
subservice=Subservice.TC_SET_HEALTH,
|
subservice=Subservice.TC_SET_HEALTH,
|
||||||
app_data=pack_set_health_cmd_data(object_id=gyr_obj_id, health=FsfwHealth.FAULTY)
|
app_data=pack_set_health_cmd_data(
|
||||||
|
object_id=gyr_obj_id, health=FsfwHealth.FAULTY
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 25.03.2021
|
@date 25.03.2021
|
||||||
"""
|
"""
|
||||||
|
import enum
|
||||||
import logging
|
import logging
|
||||||
import struct
|
import struct
|
||||||
from typing import List
|
from typing import List
|
||||||
@ -22,6 +23,10 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
|||||||
make_sid,
|
make_sid,
|
||||||
generate_one_diag_command,
|
generate_one_diag_command,
|
||||||
generate_one_hk_command,
|
generate_one_hk_command,
|
||||||
|
create_request_one_diag_command,
|
||||||
|
create_enable_periodic_hk_command,
|
||||||
|
create_disable_periodic_hk_command,
|
||||||
|
create_enable_periodic_hk_command_with_interval,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32
|
||||||
@ -36,8 +41,15 @@ class OpCode:
|
|||||||
NORMAL = "normal"
|
NORMAL = "normal"
|
||||||
OFF = "off"
|
OFF = "off"
|
||||||
SET_DIPOLE = "set_dipole"
|
SET_DIPOLE = "set_dipole"
|
||||||
REQUEST_ENG_HK = "hk_os_eng_hk"
|
REQUEST_ENG_HK_NO_TORQUE = "hk_os_eng_hk"
|
||||||
REQUEST_MGM_RAW = "hk_os_mgm_raw"
|
REQUEST_MGM_RAW_NO_TORQUE = "hk_os_mgm_raw_no_torque"
|
||||||
|
ENABLE_MGM_RAW_NO_TORQUE = "enb_mgm_raw_no_torque"
|
||||||
|
DISABLE_MGM_RAW_NO_TORQUE = "dis_mgm_raw_no_torque"
|
||||||
|
REQUEST_MGM_RAW_WITH_TORQUE = "hk_os_mgm_raw_with_torque"
|
||||||
|
ENABLE_MGM_RAW_WITH_TORQUE = "enb_mgm_raw_with_torque"
|
||||||
|
DISABLE_MGM_RAW_WITH_TORQUE = "dis_mgm_raw_with_torque"
|
||||||
|
ENABLE_ENG_HK_NO_TORQUE = "enb_eng_hk_no_torque"
|
||||||
|
DISABLE_ENG_HK_NO_TORQUE = "dis_eng_hk_no_torque"
|
||||||
POS_X_SELF_TEST = "self_test_pos_x"
|
POS_X_SELF_TEST = "self_test_pos_x"
|
||||||
NEG_X_SELF_TEST = "self_test_neg_x"
|
NEG_X_SELF_TEST = "self_test_neg_x"
|
||||||
POS_Y_SELF_TEST = "self_test_pos_y"
|
POS_Y_SELF_TEST = "self_test_pos_y"
|
||||||
@ -46,7 +58,7 @@ class OpCode:
|
|||||||
NEG_Z_SELF_TEST = "self_test_neg_z"
|
NEG_Z_SELF_TEST = "self_test_neg_z"
|
||||||
|
|
||||||
|
|
||||||
class ImtqSetId:
|
class ImtqSetId(enum.IntEnum):
|
||||||
ENG_HK_NO_TORQUE = 1
|
ENG_HK_NO_TORQUE = 1
|
||||||
RAW_MTM_NO_TORQUE = 2
|
RAW_MTM_NO_TORQUE = 2
|
||||||
ENG_HK_SET_WITH_TORQUE = 3
|
ENG_HK_SET_WITH_TORQUE = 3
|
||||||
@ -61,7 +73,6 @@ class ImtqSetId:
|
|||||||
NEGATIVE_Y_TEST = 13
|
NEGATIVE_Y_TEST = 13
|
||||||
POSITIVE_Z_TEST = 14
|
POSITIVE_Z_TEST = 14
|
||||||
NEGATIVE_Z_TEST = 15
|
NEGATIVE_Z_TEST = 15
|
||||||
SELF_TEST_SET = 16
|
|
||||||
|
|
||||||
|
|
||||||
class ImtqActionId:
|
class ImtqActionId:
|
||||||
@ -84,8 +95,13 @@ def add_imtq_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(OpCode.OFF, "Mode Off")
|
oce.add(OpCode.OFF, "Mode Off")
|
||||||
oce.add(OpCode.ON, "Mode On")
|
oce.add(OpCode.ON, "Mode On")
|
||||||
oce.add(OpCode.NORMAL, "Mode Normal")
|
oce.add(OpCode.NORMAL, "Mode Normal")
|
||||||
oce.add(OpCode.REQUEST_ENG_HK, "Request Engineering HK One Shot")
|
oce.add(OpCode.REQUEST_ENG_HK_NO_TORQUE, "Request Engineering HK One Shot")
|
||||||
oce.add(OpCode.REQUEST_MGM_RAW, "Request MGM Raw HK One Shot")
|
oce.add(OpCode.REQUEST_MGM_RAW_NO_TORQUE, "Request MGM Raw Without Torque HK One Shot")
|
||||||
|
oce.add(OpCode.ENABLE_MGM_RAW_NO_TORQUE, "Enable MGM Raw Without Torque HK")
|
||||||
|
oce.add(OpCode.DISABLE_MGM_RAW_NO_TORQUE, "Disable MGM Raw Without Torque HK")
|
||||||
|
oce.add(OpCode.REQUEST_MGM_RAW_WITH_TORQUE, "Request MGM Raw With Torque HK One Shot")
|
||||||
|
oce.add(OpCode.ENABLE_MGM_RAW_WITH_TORQUE, "Enable MGM Raw With Torque HK")
|
||||||
|
oce.add(OpCode.DISABLE_MGM_RAW_WITH_TORQUE, "Disable MGM Raw With Torque HK")
|
||||||
oce.add(OpCode.POS_X_SELF_TEST, "IMTQ perform pos X self test")
|
oce.add(OpCode.POS_X_SELF_TEST, "IMTQ perform pos X self test")
|
||||||
oce.add(OpCode.NEG_X_SELF_TEST, "IMTQ perform neg X self test")
|
oce.add(OpCode.NEG_X_SELF_TEST, "IMTQ perform neg X self test")
|
||||||
oce.add(OpCode.POS_Y_SELF_TEST, "IMTQ perform pos Y self test")
|
oce.add(OpCode.POS_Y_SELF_TEST, "IMTQ perform pos Y self test")
|
||||||
@ -208,12 +224,29 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if op_code == "10":
|
if op_code == "10": # doesnt seem to work anymore
|
||||||
q.add_log_cmd("IMTQ: Get commanded dipole")
|
q.add_log_cmd("IMTQ: Get commanded dipole")
|
||||||
command = object_id.as_bytes + ImtqActionId.get_commanded_dipole
|
command = object_id.as_bytes + ImtqActionId.get_commanded_dipole
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
|
|
||||||
if op_code == OpCode.REQUEST_ENG_HK:
|
if op_code == OpCode.ENABLE_ENG_HK_NO_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Enable ENG HK")
|
||||||
|
interval = float(input("Please enter collection interval in seconds: "))
|
||||||
|
cmds = create_enable_periodic_hk_command_with_interval(
|
||||||
|
diag=True,
|
||||||
|
sid=make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE),
|
||||||
|
interval_seconds=interval,
|
||||||
|
)
|
||||||
|
for cmd in cmds:
|
||||||
|
q.add_pus_tc(cmd)
|
||||||
|
if op_code == OpCode.DISABLE_ENG_HK_NO_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Disable ENG HK (No Torque)")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_disable_periodic_hk_command(
|
||||||
|
True, make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == OpCode.REQUEST_ENG_HK_NO_TORQUE:
|
||||||
q.add_log_cmd("IMTQ: Get engineering hk set")
|
q.add_log_cmd("IMTQ: Get engineering hk set")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
generate_one_diag_command(
|
generate_one_diag_command(
|
||||||
@ -226,21 +259,65 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
|
|||||||
if op_code == "12":
|
if op_code == "12":
|
||||||
q.add_log_cmd("IMTQ: Get calibrated MTM hk set")
|
q.add_log_cmd("IMTQ: Get calibrated MTM hk set")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
generate_one_diag_command(
|
create_request_one_diag_command(
|
||||||
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.CAL_MTM_SET)
|
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetId.CAL_MTM_SET)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if op_code == OpCode.REQUEST_MGM_RAW:
|
if op_code == OpCode.REQUEST_MGM_RAW_NO_TORQUE:
|
||||||
q.add_log_cmd("IMTQ: Get raw MTM hk set")
|
q.add_log_cmd("IMTQ: Get raw MTM hk set")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
generate_one_diag_command(
|
create_request_one_diag_command(
|
||||||
sid=make_sid(
|
sid=make_sid(
|
||||||
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_NO_TORQUE
|
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_NO_TORQUE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if op_code == OpCode.DISABLE_MGM_RAW_NO_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_disable_periodic_hk_command(
|
||||||
|
True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == OpCode.ENABLE_MGM_RAW_NO_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)")
|
||||||
|
interval = float(input("Please enter collection interval in seconds: "))
|
||||||
|
cmds = create_enable_periodic_hk_command_with_interval(
|
||||||
|
diag=True,
|
||||||
|
sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE),
|
||||||
|
interval_seconds=interval,
|
||||||
|
)
|
||||||
|
for cmd in cmds:
|
||||||
|
q.add_pus_tc(cmd)
|
||||||
|
if op_code == OpCode.REQUEST_MGM_RAW_WITH_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Get raw MTM hk set")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_request_one_diag_command(
|
||||||
|
sid=make_sid(
|
||||||
|
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_WITH_TORQUE
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code == OpCode.ENABLE_MGM_RAW_WITH_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)")
|
||||||
|
interval = float(input("Please enter collection interval in seconds: "))
|
||||||
|
cmds = create_enable_periodic_hk_command_with_interval(
|
||||||
|
diag=True,
|
||||||
|
sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE),
|
||||||
|
interval_seconds=interval,
|
||||||
|
)
|
||||||
|
for cmd in cmds:
|
||||||
|
q.add_pus_tc(cmd)
|
||||||
|
if op_code == OpCode.DISABLE_MGM_RAW_WITH_TORQUE:
|
||||||
|
q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)")
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_disable_periodic_hk_command(
|
||||||
|
True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_dipole_command(
|
def pack_dipole_command(
|
||||||
object_id: bytes, x_dipole: int, y_dipole: int, z_dipole: int, duration: int
|
object_id: bytes, x_dipole: int, y_dipole: int, z_dipole: int, duration: int
|
||||||
@ -308,7 +385,7 @@ ENG_HK_HEADERS = [
|
|||||||
|
|
||||||
|
|
||||||
def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
|
def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
|
||||||
if set_id == ImtqSetId.SELF_TEST_SET:
|
if (set_id >= ImtqSetId.POSITIVE_X_TEST) and (set_id <= ImtqSetId.NEGATIVE_Z_TEST):
|
||||||
return handle_self_test_data(printer, hk_data)
|
return handle_self_test_data(printer, hk_data)
|
||||||
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
|
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
|
||||||
_LOGGER.info("Found engineering HK without torque")
|
_LOGGER.info("Found engineering HK without torque")
|
||||||
|
@ -5,7 +5,12 @@ from eive_tmtc.config.definitions import CustomServiceList
|
|||||||
from tmtccmd.config import OpCodeEntry
|
from tmtccmd.config import OpCodeEntry
|
||||||
|
|
||||||
import eive_tmtc.config.object_ids as obj_ids
|
import eive_tmtc.config.object_ids as obj_ids
|
||||||
from eive_tmtc.config.object_ids import MGM_0_LIS3_HANDLER_ID, MGM_1_RM3100_HANDLER_ID, MGM_2_LIS3_HANDLER_ID, MGM_3_RM3100_HANDLER_ID
|
from eive_tmtc.config.object_ids import (
|
||||||
|
MGM_0_LIS3_HANDLER_ID,
|
||||||
|
MGM_1_RM3100_HANDLER_ID,
|
||||||
|
MGM_2_LIS3_HANDLER_ID,
|
||||||
|
MGM_3_RM3100_HANDLER_ID,
|
||||||
|
)
|
||||||
|
|
||||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||||
from tmtccmd.config.tmtc import tmtc_definitions_provider, TmtcDefinitionWrapper
|
from tmtccmd.config.tmtc import tmtc_definitions_provider, TmtcDefinitionWrapper
|
||||||
|
@ -8,13 +8,9 @@
|
|||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
|
||||||
from tmtccmd.tc.pus_20_fsfw_param import (
|
from tmtccmd.tc.pus_20_fsfw_param import create_load_param_cmd
|
||||||
create_load_param_cmd
|
|
||||||
)
|
|
||||||
|
|
||||||
from tmtccmd.pus.s20_fsfw_param_defs import (
|
from tmtccmd.pus.s20_fsfw_param_defs import create_scalar_u8_parameter
|
||||||
create_scalar_u8_parameter
|
|
||||||
)
|
|
||||||
|
|
||||||
from tmtccmd.config.tmtc import (
|
from tmtccmd.config.tmtc import (
|
||||||
tmtc_definitions_provider,
|
tmtc_definitions_provider,
|
||||||
@ -46,7 +42,9 @@ class OpCode:
|
|||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
PRINT_CLCW = "Will cause the OBSW to print the current CLCW to the debug console"
|
PRINT_CLCW = "Will cause the OBSW to print the current CLCW to the debug console"
|
||||||
PRINT_MON_REG = "Will cause the OBSW to print the PDEC monitor register to the console"
|
PRINT_MON_REG = (
|
||||||
|
"Will cause the OBSW to print the PDEC monitor register to the console"
|
||||||
|
)
|
||||||
POSITIVE_WINDOW = "Change positive window parameter for AD frames"
|
POSITIVE_WINDOW = "Change positive window parameter for AD frames"
|
||||||
NEGATIVE_WINDOW = "Change negative window parameter for AD frames"
|
NEGATIVE_WINDOW = "Change negative window parameter for AD frames"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user