diff options
| -rw-r--r-- | src/MTS_IO_SerialConnection.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/MTS_IO_SerialConnection.cpp b/src/MTS_IO_SerialConnection.cpp index c91f5d5..a12a09b 100644 --- a/src/MTS_IO_SerialConnection.cpp +++ b/src/MTS_IO_SerialConnection.cpp @@ -50,6 +50,7 @@ SerialConnection::Builder::Builder(const std::string& sPortName)  , m_eParity(OFF)  , m_eDataBits(B8)  , m_eStopBits(B1) +, m_eFlowControl(NONE)  , m_bBuilt(false)  { @@ -424,6 +425,7 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) {      }      //Set Parity, Stop Bits, and Data Length +    options.c_cflag &= ~(PARODD | PARENB);      switch(m_eParity) {          case ODD:              options.c_cflag |= ( PARODD | PARENB ); @@ -434,8 +436,6 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) {              break;          case OFF: -        default: -            options.c_cflag &= ~PARENB;              break;      } @@ -461,7 +461,7 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) {      switch(m_eStopBits) {          case B2: -            options.c_cflag &= CSTOPB; +            options.c_cflag |= CSTOPB;              break;          case B1: @@ -472,11 +472,11 @@ bool SerialConnection::doOpen(const int32_t& timeoutMillis) {  	switch (m_eFlowControl) {  		case RTS_CTS: -			options.c_cflag &= CRTSCTS; +            options.c_cflag |= CRTSCTS;  			break;  		case NONE:  		default: -			options.c_cflag &= ~(IXON | IXOFF | IXANY); +            options.c_cflag &= ~CRTSCTS;              break;      } | 
