Skip to content

Commit c25cadd

Browse files
committed
Merge branch 'develop'
2 parents 0528cdd + d8e1cd1 commit c25cadd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [v2.1.1] - 2021-04-05
11+
12+
- Fixed bug where `echo` was not being set correctly.
13+
1014
## [v2.1.0] - 2020-11-08
1115

1216
### Added

src/SerialPort.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,12 @@ namespace CppLinuxSerial {
347347
// Canonical input is when read waits for EOL or EOF characters before returning. In non-canonical mode, the rate at which
348348
// read() returns is instead controlled by c_cc[VMIN] and c_cc[VTIME]
349349
tty.c_lflag &= ~ICANON; // Turn off canonical input, which is suitable for pass-through
350-
echo_ ? (tty.c_lflag | ECHO ) : (tty.c_lflag & ~(ECHO)); // Configure echo depending on echo_ boolean
350+
// Configure echo depending on echo_ boolean
351+
if(echo_) {
352+
tty.c_lflag |= ECHO;
353+
} else {
354+
tty.c_lflag &= ~(ECHO);
355+
}
351356
tty.c_lflag &= ~ECHOE; // Turn off echo erase (echo erase only relevant if canonical input is active)
352357
tty.c_lflag &= ~ECHONL; //
353358
tty.c_lflag &= ~ISIG; // Disables recognition of INTR (interrupt), QUIT and SUSP (suspend) characters

0 commit comments

Comments
 (0)