Commit c25cadd95efc705ea25103facf8608249dcf7204
Merge branch 'develop'
Showing
2 changed files
with
10 additions
and
1 deletions
CHANGELOG.md
src/SerialPort.cpp
| ... | ... | @@ -347,7 +347,12 @@ namespace CppLinuxSerial { |
| 347 | 347 | // Canonical input is when read waits for EOL or EOF characters before returning. In non-canonical mode, the rate at which |
| 348 | 348 | // read() returns is instead controlled by c_cc[VMIN] and c_cc[VTIME] |
| 349 | 349 | 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 | + } | |
| 351 | 356 | tty.c_lflag &= ~ECHOE; // Turn off echo erase (echo erase only relevant if canonical input is active) |
| 352 | 357 | tty.c_lflag &= ~ECHONL; // |
| 353 | 358 | tty.c_lflag &= ~ISIG; // Disables recognition of INTR (interrupt), QUIT and SUSP (suspend) characters | ... | ... |