Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
01b3a894e6 | |||
f075d28905 | |||
83f6a22a75 | |||
a38bae16cd | |||
53666bdeda | |||
00281fdc5e | |||
43b530cdb7 | |||
92ce64cd39 | |||
268c9e3f0b |
@ -10,6 +10,12 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v2.22.1] 2023-04-12
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Prompts to specify custom filename for OBSW update
|
||||||
|
|
||||||
# [v2.22.0] 2023-04-07
|
# [v2.22.0] 2023-04-07
|
||||||
|
|
||||||
- Various smaller and helper commands added for tests
|
- Various smaller and helper commands added for tests
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
__version__ = "2.22.0"
|
__version__ = "2.22.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 = 2
|
VERSION_MAJOR = 2
|
||||||
VERSION_MINOR = 22
|
VERSION_MINOR = 22
|
||||||
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
|
||||||
|
@ -2,6 +2,7 @@ import enum
|
|||||||
|
|
||||||
|
|
||||||
class Mode(enum.IntEnum):
|
class Mode(enum.IntEnum):
|
||||||
|
NONE = 0
|
||||||
RX_ONLY = 10
|
RX_ONLY = 10
|
||||||
RX_AND_TX_DEF_DATARATE = 11
|
RX_AND_TX_DEF_DATARATE = 11
|
||||||
RX_AND_TX_LOW_DATARATE = 12
|
RX_AND_TX_LOW_DATARATE = 12
|
||||||
|
@ -267,7 +267,7 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
)
|
)
|
||||||
elif op_code in OpCode.SWITCH_TO_BOTH_SD_CARDS:
|
elif op_code in OpCode.SWITCH_TO_BOTH_SD_CARDS:
|
||||||
while True:
|
while True:
|
||||||
active_sd_card = int(input("Please specify active SD cqrd [0/1]: "))
|
active_sd_card = int(input("Please specify active SD card [0/1]: "))
|
||||||
if active_sd_card not in [0, 1]:
|
if active_sd_card not in [0, 1]:
|
||||||
_LOGGER.warning("Invalid SD card specified. Try again")
|
_LOGGER.warning("Invalid SD card specified. Try again")
|
||||||
break
|
break
|
||||||
@ -343,7 +343,11 @@ def determine_chip_and_copy() -> (int, int):
|
|||||||
|
|
||||||
def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
||||||
chip, copy = determine_chip_and_copy()
|
chip, copy = determine_chip_and_copy()
|
||||||
user_data = bytes([chip, copy])
|
user_data = bytearray([chip, copy])
|
||||||
|
custom_file_name = input("Use custom filename [y/n] ?: ")
|
||||||
|
if custom_file_name.lower() in ["y", "yes", "1"]:
|
||||||
|
custom_file_name = input("Specify custom filename: ")
|
||||||
|
user_data.extend(custom_file_name.encode())
|
||||||
return create_action_cmd(
|
return create_action_cmd(
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data
|
object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data
|
||||||
)
|
)
|
||||||
|
@ -15,6 +15,7 @@ from eive_tmtc.config.object_ids import (
|
|||||||
SUS_6_R_LOC_XFYBZM_PT_XF,
|
SUS_6_R_LOC_XFYBZM_PT_XF,
|
||||||
RW1_ID,
|
RW1_ID,
|
||||||
RW2_ID,
|
RW2_ID,
|
||||||
|
RTD_0_PLOC_HSPD,
|
||||||
)
|
)
|
||||||
|
|
||||||
SUBSYSTEM_DICT = {
|
SUBSYSTEM_DICT = {
|
||||||
@ -40,6 +41,20 @@ ACS_OBJ_DICT = {
|
|||||||
13: ("RW 2", RW2_ID),
|
13: ("RW 2", RW2_ID),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TCS_OBJ_DICT = {
|
||||||
|
0: ("RTD 0", RTD_0_PLOC_HSPD),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def get_obj_if_from_dict(lut: dict) -> bytes:
|
||||||
|
for k, v in lut.items():
|
||||||
|
print(f"{k}: {v[0]}")
|
||||||
|
obj_key = int(input("Please specify target object by key: "))
|
||||||
|
name_and_obj_id = lut[obj_key]
|
||||||
|
if name_and_obj_id is None:
|
||||||
|
raise ValueError("invalid key")
|
||||||
|
return name_and_obj_id[1]
|
||||||
|
|
||||||
|
|
||||||
def prompt_object() -> bytes:
|
def prompt_object() -> bytes:
|
||||||
for k, v in SUBSYSTEM_DICT.items():
|
for k, v in SUBSYSTEM_DICT.items():
|
||||||
@ -49,10 +64,9 @@ def prompt_object() -> bytes:
|
|||||||
if subsystem is None:
|
if subsystem is None:
|
||||||
raise ValueError("invalid key")
|
raise ValueError("invalid key")
|
||||||
if subsystem == "acs":
|
if subsystem == "acs":
|
||||||
for k, v in ACS_OBJ_DICT.items():
|
return get_obj_if_from_dict(ACS_OBJ_DICT)
|
||||||
print(f"{k}: {v[0]}")
|
elif subsystem == "tcs":
|
||||||
obj_key = int(input("Please specify target object by key: "))
|
return get_obj_if_from_dict(TCS_OBJ_DICT)
|
||||||
acs_obj = ACS_OBJ_DICT[obj_key]
|
else:
|
||||||
if acs_obj is None:
|
print(f"No object for subsystem {subsystem}")
|
||||||
raise ValueError("invalid key")
|
return bytes()
|
||||||
return acs_obj[1]
|
|
||||||
|
Reference in New Issue
Block a user