diff --git a/.idea/runConfigurations/OBSW_TmTcClient_Service_5_Serial.xml b/.idea/runConfigurations/tmtcclient_Service_5_Serial.xml similarity index 81% rename from .idea/runConfigurations/OBSW_TmTcClient_Service_5_Serial.xml rename to .idea/runConfigurations/tmtcclient_Service_5_Serial.xml index eda5cab00b0180271909efa50efd37db04df10ae..8368a3a3216f7d643c74d97bf9d223ee8ba3102a 100644 --- a/.idea/runConfigurations/OBSW_TmTcClient_Service_5_Serial.xml +++ b/.idea/runConfigurations/tmtcclient_Service_5_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_TmTcClient Service 5 Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="tmtcclient Service 5 Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> @@ -13,7 +13,7 @@ <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/obsw_tmtc_client.py" /> - <option name="PARAMETERS" value="-m 3 -s 5 -c 1 -p" /> + <option name="PARAMETERS" value="-m 3 -s 5 -c 1 -t 3" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="true" /> <option name="MODULE_MODE" value="false" /> diff --git a/comIF/obsw_com_config.py b/comIF/obsw_com_config.py index 534a2360483b22d193853c31f8612c6ffc75b108..6abb6165910275770f89933cef38879c52df2f1a 100644 --- a/comIF/obsw_com_config.py +++ b/comIF/obsw_com_config.py @@ -16,6 +16,7 @@ import config.obsw_config as g LOGGER = get_logger() + def set_communication_interface(tmtc_printer: TmTcPrinter) -> CommunicationInterface: """ Return the desired communication interface object @@ -29,11 +30,10 @@ def set_communication_interface(tmtc_printer: TmTcPrinter) -> CommunicationInter tc_timeout_factor=g.G_TC_SEND_TIMEOUT_FACTOR, send_address=g.G_SEND_ADDRESS, receive_address=g.G_REC_ADDRESS) elif g.G_COM_IF == g.ComIF.Serial: - com_port = g.G_COM_PORT serial_baudrate = g.G_SERIAL_BAUDRATE serial_timeout = g.G_SERIAL_TIMEOUT communication_interface = SerialComIF( - tmtc_printer=tmtc_printer, com_port=com_port, baud_rate=serial_baudrate, + tmtc_printer=tmtc_printer, com_port=g.G_COM_PORT, baud_rate=serial_baudrate, serial_timeout=serial_timeout) elif g.G_COM_IF == g.ComIF.QEMU: communication_interface = QEMUComIF( diff --git a/config/obsw_config.py b/config/obsw_config.py index 49f10554e608d768e8db4511d68ee34d9b1017df..ad17aea73e039eb2f6d3786aaea99d4aa43df65f 100644 --- a/config/obsw_config.py +++ b/config/obsw_config.py @@ -86,7 +86,7 @@ G_COM_IF = 2 # COM Port for serial communication G_COM_PORT = 'COM0' G_SERIAL_TIMEOUT = 1 -G_SERIAL_BAUDRATE = 250000 +G_SERIAL_BAUDRATE = 230400 # Time related G_TM_TIMEOUT = 6 G_TC_SEND_TIMEOUT_FACTOR = 2.0 diff --git a/utility/obsw_exit_handler.py b/utility/obsw_exit_handler.py index c274cec54528b48430f7942618d789b860bbea35..437eef10837c7e56c3e5ea584fb02090109af86e 100644 --- a/utility/obsw_exit_handler.py +++ b/utility/obsw_exit_handler.py @@ -4,6 +4,7 @@ from utility.obsw_logger import get_logger logger = get_logger() + def keyboard_interrupt_handler(com_interface: CommunicationInterface): logger.info("Disconnect registered") # Unit Test closes Serial Port at the end