Commit 3aa966ca578139828844a3b511d55821374d4d5f

Authored by Geoffrey Hunter
1 parent f96dd460

Serial port state is now set to 'CLOSED' on initialization.

CHANGELOG.md
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
11 - Sphinx documentation. 11 - Sphinx documentation.
12 - Unit tests for testing `SetTimeout()`. 12 - Unit tests for testing `SetTimeout()`.
13 13
  14 +### Fixed
  15 +- Serial port state is set to `CLOSED` on initialization.
  16 +
14 ## [v2.0.1] - 2017-11-27 17 ## [v2.0.1] - 2017-11-27
15 18
16 ### Fixed 19 ### Fixed
src/SerialPort.cpp
@@ -31,6 +31,7 @@ namespace CppLinuxSerial { @@ -31,6 +31,7 @@ namespace CppLinuxSerial {
31 baudRate_ = defaultBaudRate_; 31 baudRate_ = defaultBaudRate_;
32 readBufferSize_B_ = defaultReadBufferSize_B_; 32 readBufferSize_B_ = defaultReadBufferSize_B_;
33 readBuffer_.reserve(readBufferSize_B_); 33 readBuffer_.reserve(readBufferSize_B_);
  34 + state_ = State::CLOSED;
34 } 35 }
35 36
36 SerialPort::SerialPort(const std::string& device, BaudRate baudRate) : 37 SerialPort::SerialPort(const std::string& device, BaudRate baudRate) :