From 6420bd162a043f6b42b72ec1a2a5b337cb82f536 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 26 Oct 2023 17:14:18 +0200 Subject: [PATCH] smaller fixes --- eive_tmtc/tmtc/acs/star_tracker.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/eive_tmtc/tmtc/acs/star_tracker.py b/eive_tmtc/tmtc/acs/star_tracker.py index 642cb1c..8109fe2 100644 --- a/eive_tmtc/tmtc/acs/star_tracker.py +++ b/eive_tmtc/tmtc/acs/star_tracker.py @@ -726,9 +726,6 @@ def request_dataset(q: DefaultPusQueueHelper, type: DataSetRequest): else: print("Not Implemented Yet") case DataSetRequest.DISABLE: - interval = float( - input("Please specify interval in floating point seconds: ") - ) if setId in [SetId.SOLUTION]: q.add_pus_tc( disable_periodic_hk_command(True, make_sid(STAR_TRACKER_ID, setId)) @@ -943,7 +940,7 @@ def handle_blob_set(hk_data: bytes, pw: PrintWrapper): _LOGGER.warning(f"Blob dataset HK data with length {len(hk_data)} too short") return current_idx = unpack_time_hk(hk_data, 0, pw) - blob_count = struct.unpack("!I", hk_data[current_idx : current_idx + 4]) + blob_count = struct.unpack("!I", hk_data[current_idx : current_idx + 4])[0] pw.dlog(f"Blob count: {blob_count}") FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx + 4 :], num_vars=3) @@ -982,7 +979,7 @@ def handle_centroid_set(hk_data: bytes, pw: PrintWrapper): f"Centroid dataset HK data with length {len(hk_data)} too short" ) current_idx = unpack_time_hk(hk_data, 0, pw) - centroid_count = struct.unpack("!I", hk_data[current_idx : current_idx + 4]) + centroid_count = struct.unpack("!I", hk_data[current_idx : current_idx + 4])[0] pw.dlog(f"Centroid count: {centroid_count}") FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=3) @@ -990,7 +987,8 @@ def handle_centroid_set(hk_data: bytes, pw: PrintWrapper): def handle_centroids_set(hk_data: bytes, pw: PrintWrapper): pw.dlog("Received Centroids Set") current_idx = unpack_time_hk(hk_data, 0, pw) - centroids_count = struct.unpack("!H", hk_data[current_idx : current_idx + 2]) + centroids_count = struct.unpack("!H", hk_data[current_idx : current_idx + 2])[0] + current_idx += 2 pw.dlog(f"Centroids count: {centroids_count}") fmt_coords = "!HHHHHHHHHHHHHHHH" inc_len = struct.calcsize(fmt_coords)