elks-enhanced

publicRead
Owner: themasterBranch: masterCommits: 6893Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL

Commit diff

Commit fd8309379b9f5fd4ef35222d0dbd5f7e5065e96
commit fd8309379b9f5fd4ef35222d0dbd5f7e5065e961
Author: Greg Haerr <greg@censoft.com>
Date:   Mon Mar 16 11:54:56 2026 -0700

    [cmds] Keep existing terminal baud rate when running miniterm from serial port
    From @Mellvik TLVC #231
---
 elkscmd/misc_utils/miniterm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elkscmd/misc_utils/miniterm.c b/elkscmd/misc_utils/miniterm.c
index 90ac4959..4df4b5a2 100644
--- a/elkscmd/misc_utils/miniterm.c
+++ b/elkscmd/misc_utils/miniterm.c
@@ -456,16 +456,16 @@ int main(int argc, char **argv)
 	if (mode == MODE_TEXT) {
 		struct termios new;
 
+		tcgetattr(1, &stdout_termio);
 		set_raw(0);
 
-		new.c_cflag |= CS8 | CREAD;
+		new.c_cflag |= (stdout_termio.c_cflag & CBAUD) | CS8 | CREAD;
 		new.c_iflag = IGNPAR;
 		new.c_oflag = 0;
 		new.c_lflag = 0;
 		new.c_cc[VMIN] = 1;
 		new.c_cc[VTIME] = 0;
 
-		tcgetattr(1, &stdout_termio);
 		tcsetattr(1, TCSANOW, &new);
 
 		tcgetattr(0, &stdin_termio);