From e17dc40aee28e4748b573657be55f8c295f801c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Feb 2025 13:03:15 -0500 Subject: [PATCH] Create fc_block_decode.py --- groundstation/fc_block_decode.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 groundstation/fc_block_decode.py diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py new file mode 100644 index 00000000..b3e0b565 --- /dev/null +++ b/groundstation/fc_block_decode.py @@ -0,0 +1,23 @@ +import sys +from os import system +from time import sleep +import logging +logging.basicConfig(format='%(message)s') +# logging.warning('CC-Warning!') + +if __name__ == "__main__": + debug_mode = False + counter = 1 + if (len(sys.argv)) > 1: +# print("There are arguments!") + if ('d' == sys.argv[1]): + debug_mode = True + + print(debug_mode) + for line in sys.stdin: + if (debug_mode): + print(line, end =" ") + logging.warning(line) + + if ((line.find("data: ")) > 0): + print("\ndata block found!\n")