changelog

This commit is contained in:
Robin Müller 2023-03-06 13:58:52 +01:00
parent f18a7f49cf
commit 2aa1ecd3a7
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 11 additions and 7 deletions

View File

@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
# [unreleased]
## Added
- Health set and health announce commands
# [v2.16.4] 2023-03-04
## Added

View File

@ -28,7 +28,7 @@ class Info:
def prompt_health() -> FsfwHealth:
for item in FsfwHealth:
print(f"{item}: {item.name}")
health_idx = input("Please enter health by index: ")
health_idx = int(input("Please enter health by index: "))
return FsfwHealth(health_idx)
@ -39,14 +39,14 @@ def pack_test_command(p: ServiceProviderParams):
if o == OpCode.SET_HEALTH:
app_data = bytearray(prompt_object())
health = prompt_health()
app_data.extend(struct.pack("!I", health))
app_data.append(health)
q.add_log_cmd(Info.SET_HEALTH)
q.add_pus_tc(
PusTelecommand(
service=201, subservice=Subservice.TC_SET_HEALTH, app_data=app_data
)
)
if o == OpCode.ANNOUNCE_HEALTH:
elif o == OpCode.ANNOUNCE_HEALTH:
app_data = bytearray(prompt_object())
q.add_log_cmd(Info.ANNOUNCE_HEALTH)
q.add_pus_tc(
@ -59,8 +59,8 @@ def pack_test_command(p: ServiceProviderParams):
q.add_pus_tc(
PusTelecommand(service=201, subservice=Subservice.TC_ANNOUNCE_HEALTH_ALL)
)
return
raise ValueError(f"unknown op code {o} for service {CustomServiceList.HEALTH}")
else:
raise ValueError(f"unknown op code {o} for service {CustomServiceList.HEALTH}")
@tmtc_definitions_provider

View File

@ -23,14 +23,14 @@ ACS_OBJ_DICT = {
def prompt_object() -> bytes:
for k, v in SUBSYSTEM_DICT:
for k, v in SUBSYSTEM_DICT.items():
print(f"{k}: {v}")
subsystem_key = int(input("Please specify target subsystem by key: "))
subsystem = SUBSYSTEM_DICT[subsystem_key]
if subsystem is None:
raise ValueError("invalid key")
if subsystem == "acs":
for k, v in ACS_OBJ_DICT:
for k, v in ACS_OBJ_DICT.items():
print(f"{k}: {v[0]}")
obj_key = int(input("Please specify target object by key: "))
acs_obj = ACS_OBJ_DICT[obj_key]