STR bugfixes

This commit is contained in:
Robin Müller 2023-04-14 17:42:09 +02:00
parent f8da9cff7c
commit f57342602d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 17 additions and 5 deletions

View File

@ -10,6 +10,11 @@ list yields a list of all related PRs for each release.
# [unreleased]
## Fixed
- Bugfix for STR solution set format.
- Update for STR commands.
## Added
- Added core commands to execute `systemctl` commands and to execute arbitrary Linux commands.

View File

@ -168,7 +168,8 @@ FW_DICT = {
"3": ("Firmware Origin", FileDefs.firmware_origin),
}
upload_image_dict = {
UPLOAD_IMAGE_DICT = {
"0": ("custom path", "Custom Path"),
"1": ("q7s gemma", "/mnt/sd0/startracker/gemma.bin"),
"2": ("egse gemma", "/home/pi/arcsec/star-images/gemma.bin"),
"3": ("q7s polaris", "/mnt/sd0/startracker/polaris.bin"),
@ -697,9 +698,12 @@ def get_firmware() -> str:
def get_upload_image() -> str:
_LOGGER.info("Specify image to upload")
input_helper = InputHelper(upload_image_dict)
input_helper = InputHelper(UPLOAD_IMAGE_DICT)
key = input_helper.get_key()
image = upload_image_dict[key][1]
if UPLOAD_IMAGE_DICT[key][0] == "custom path":
image = input("Please specify custom absolute path: ")
else:
image = UPLOAD_IMAGE_DICT[key][1]
return image
@ -805,8 +809,11 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper):
)
pw.dlog(f"Number of close stars in LISA solution: {lisa_number_close_stars}")
current_idx += fmt_len
is_trusworthy = hk_data[current_idx]
pw.dlog(f"Trustworthy solution: {is_trusworthy}")
str_mode = hk_data[current_idx]
pw.dlog(f"STR mode: {str_mode}")
current_idx += 1
is_trustworthy = hk_data[current_idx]
pw.dlog(f"Trustworthy solution: {is_trustworthy}")
current_idx += 1
stable_count = struct.unpack("!I", hk_data[current_idx : current_idx + 4])[0]
pw.dlog(f"Stable count: {stable_count}")