From 013065df39c700845b7f945dd2f084c82dd2307d Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" <robin.mueller.m@gmail.com> Date: Tue, 5 May 2020 14:41:33 +0200 Subject: [PATCH] std baudrate 230400 instead of 250 000 --- ...t_Service_5_Serial.xml => tmtcclient_Service_5_Serial.xml} | 4 ++-- comIF/obsw_com_config.py | 4 ++-- config/obsw_config.py | 2 +- utility/obsw_exit_handler.py | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) rename .idea/runConfigurations/{OBSW_TmTcClient_Service_5_Serial.xml => tmtcclient_Service_5_Serial.xml} (81%) 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 eda5cab..8368a3a 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 534a236..6abb616 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 49f1055..ad17aea 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 c274cec..437eef1 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 -- GitLab