You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CubeSatSim/groundstation/fc_block_decode.py

29 lines
698 B

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")
data_block_string = line.split()
print(data_block_string)
data_block = [int(number_string,16) for number_string in data_block_string]
print("\n")
print(data_block)
print("\n")

Powered by TurnKey Linux.