diff --git a/config/obsw_com_config.py b/config/obsw_com_config.py index 3de6c2863cc55bd60f83dc150043fe31ff972d53..93de2bae8f4a290d1d76a0ceba8d4f102e81289b 100644 --- a/config/obsw_com_config.py +++ b/config/obsw_com_config.py @@ -41,8 +41,7 @@ def set_communication_interface(tmtc_printer: TmTcPrinter) -> Union[Communicatio g.G_SERIAL_DLE_MAX_QUEUE_LEN, g.G_SERIAL_DLE_MAX_FRAME_SIZE, serial_timeout) elif g.G_COM_IF == g.ComIF.QEMU: communication_interface = QEMUComIF( - tmtc_printer=tmtc_printer, tm_timeout=g.G_TM_TIMEOUT, - tc_timeout_factor=g.G_TC_SEND_TIMEOUT_FACTOR) + tmtc_printer=tmtc_printer, serial_timeout=g.G_TM_TIMEOUT) else: communication_interface = DummyComIF(tmtc_printer=tmtc_printer) if not communication_interface.valid: diff --git a/gui/obsw_backend_test.py b/gui/obsw_backend_test.py index c21caeec5ea9d5dacbc119a6c49e66b27237083a..d9e6c488a10a2a9c5050d4dd33f328f01d548abb 100644 --- a/gui/obsw_backend_test.py +++ b/gui/obsw_backend_test.py @@ -6,6 +6,7 @@ import logging LOGGER = get_logger() + class TmTcBackend(Process): def __init__(self): from obsw_tmtc_client import TmTcHandler @@ -20,7 +21,7 @@ class TmTcBackend(Process): def listen(self): self.conn = self.listener.accept() - LOGGER.info("TmTcBackend: Connection accepted from %s",str(self.listener.last_accepted)) + LOGGER.info("TmTcBackend: Connection accepted from %s", str(self.listener.last_accepted)) while True: msg = self.conn.recv() # do something with msg diff --git a/requirements.txt b/requirements.txt index 4a3f79dd0651dd1e85c8e72f74264a7f5a6cecde..4ac62a18eeebe75e7db2b6cc16666ea926ccad88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ aiohttp==3.6.2 astroid==2.4.2 async-timeout==3.0.1 -attrs==19.3.0 +attrs==20.2.0 chardet==3.0.4 colorama==0.4.3 cpplint==1.5.4 @@ -9,18 +9,18 @@ crcmod>=1.7 docopt==0.6.2 future==0.18.2 idna==2.10 -iso8601==0.1.12 -isort==5.4.2 +iso8601==0.1.13 +isort==5.6.3 lazy-object-proxy==1.5.1 mccabe==0.6.1 multidict==4.7.6 -pylint>=2.5.3 -PyQt5>=5.15.0 -PyQt5-sip>=12.8.0 +pylint>=2.6.0 +PyQt5>=5.15.1 +PyQt5-sip>=12.8.1 pyserial>=3.4 PyYAML==5.3.1 six==1.15.0 toml==0.10.1 -typing-extensions==3.7.4.2 -wrapt==1.11.2 -yarl==1.5.1 +typing-extensions==3.7.4.3 +wrapt==1.12.1 +yarl==1.6.0 diff --git a/tc/obsw_image_handler.py b/tc/obsw_image_handler.py index aa8a3f08020deee54644c73100e983d5a195787d..5f96ad68b051046aea733aa89bb2321f9c792f3d 100644 --- a/tc/obsw_image_handler.py +++ b/tc/obsw_image_handler.py @@ -1,5 +1,5 @@ from tmtc_core.tc.obsw_pus_tc_base import PusTelecommand, Deque -from tc.obsw_tc_service8 import make_action_id +from tc.obsw_tc_service8 import make_action_id from tmtc_core.utility.obsw_logger import get_logger from config.obsw_config import SW_IMAGE_HANDLER_ID diff --git a/tc/obsw_pus_tc_packer.py b/tc/obsw_pus_tc_packer.py index 613044ace236b3acdba7fb62cdb7025671cae346..52152688dad6933afa6fa76d717a9be147d9f736 100644 --- a/tc/obsw_pus_tc_packer.py +++ b/tc/obsw_pus_tc_packer.py @@ -34,7 +34,8 @@ class ServiceQueuePacker: def __init__(self): pass - def pack_service_queue(self, service: Union[int, str], op_code: int, service_queue: TcQueueT): + @staticmethod + def pack_service_queue(service: Union[int, str], op_code: int, service_queue: TcQueueT): if service == 2: return pack_service2_test_into(service_queue) if service == 3: diff --git a/tc/obsw_tc_service5_17.py b/tc/obsw_tc_service5_17.py index 170c16bee482b63b07e1b64c2a3fb441ffca6743..23dbd25701c81f31e544a658d3a617df6f281a03 100644 --- a/tc/obsw_tc_service5_17.py +++ b/tc/obsw_tc_service5_17.py @@ -36,7 +36,7 @@ def pack_service5_test_into(tc_queue: TcQueueT) -> TcQueueT: return tc_queue -def pack_service17_test_into(tc_queue: TcQueueT, op_code: int) -> TcQueueT: +def pack_service17_test_into(tc_queue: TcQueueT, op_code: int = 0) -> TcQueueT: if op_code == 0: tc_queue.appendleft(("print", "Testing Service 17")) # ping test diff --git a/tmtc_core b/tmtc_core index 4dc01bbd094d741798c1df131e37860746dd081f..f082c488cd363308cf6f92c190397a14036341b3 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 4dc01bbd094d741798c1df131e37860746dd081f +Subproject commit f082c488cd363308cf6f92c190397a14036341b3 diff --git a/utility/binary_writer.py b/utility/binary_writer.py index 577d7ba0bcf24041f9c8ba5b9f6e2450370d4ecb..c07ab66cdf39ec3d3a3e6aa5c6bdf129d0124079 100644 --- a/utility/binary_writer.py +++ b/utility/binary_writer.py @@ -18,7 +18,6 @@ def main(): with open(file_path, "rb+") as file: # Read the first seven ARM vectors. The sixth one will be replaced. arm_vectors = file.read(4 * 7) - arm_vector_6 = arm_vectors[5*4:5*4 + 4] print("ARM vectors: ") # print(''.join('{:02x}'.format(x) for x in arm_vectors)) for x in range(0, 28, 4): diff --git a/utility/obsw_binary_uploader.py b/utility/obsw_binary_uploader.py index ed98abd04cee4023a57cd6a6a3c7e8dd3b20e034..d8f6d8975a1a6511507379e74d7dba3142f21a94 100644 --- a/utility/obsw_binary_uploader.py +++ b/utility/obsw_binary_uploader.py @@ -116,13 +116,6 @@ def perform_file_upload(com_if: CommunicationInterface, tmtc_printer: TmTcPrinte # now we calculate the hamming code pass - # Read file as binary file - if file_path != (): - with open(file_path, 'rb') as file: - data_to_read = bytearray(file.read()) - else: - LOGGER.info("Specified path invalid..") - tc_queue = deque() # Delete existing binary file first, otherwise data might be appended to otherwise