From acb24b2f63fdfb57b10c5d016d833793bb0e91d2 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sun, 8 Oct 2023 11:34:45 +1030 Subject: [PATCH] Handle no subframe data available --- auto_rx/utils/rs41cal.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/auto_rx/utils/rs41cal.py b/auto_rx/utils/rs41cal.py index 45e6692..9ae65c3 100644 --- a/auto_rx/utils/rs41cal.py +++ b/auto_rx/utils/rs41cal.py @@ -239,10 +239,11 @@ if __name__ == "__main__": # Assume this is a serial number and try and download it. (subframe_data, telem) = download_subframe_data(args.filename) - subframe = RS41Subframe(raw_bytes=subframe_data) + if subframe_data: + subframe = RS41Subframe(raw_bytes=subframe_data) - print("Telemetry data at time of subframe collection:") - pprint.pprint(telem) + print("Telemetry data at time of subframe collection:") + pprint.pprint(telem)