From 3aa966ca578139828844a3b511d55821374d4d5f Mon Sep 17 00:00:00 2001 From: Geoffrey Hunter Date: Thu, 30 May 2019 22:27:46 -0700 Subject: [PATCH] Serial port state is now set to 'CLOSED' on initialization. --- CHANGELOG.md | 3 +++ src/SerialPort.cpp | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4094786..e326a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Sphinx documentation. - Unit tests for testing `SetTimeout()`. +### Fixed +- Serial port state is set to `CLOSED` on initialization. + ## [v2.0.1] - 2017-11-27 ### Fixed diff --git a/src/SerialPort.cpp b/src/SerialPort.cpp index c80a831..9bf0aca 100644 --- a/src/SerialPort.cpp +++ b/src/SerialPort.cpp @@ -31,6 +31,7 @@ namespace CppLinuxSerial { baudRate_ = defaultBaudRate_; readBufferSize_B_ = defaultReadBufferSize_B_; readBuffer_.reserve(readBufferSize_B_); + state_ = State::CLOSED; } SerialPort::SerialPort(const std::string& device, BaudRate baudRate) : -- libgit2 0.21.4