This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new 96cd66cf5 system/cu: Disable echo if it's enabled to avoid double input character 96cd66cf5 is described below commit 96cd66cf517b5426bf45bf090808ebdb6fdbd830 Author: Huang Qi <huang...@xiaomi.com> AuthorDate: Tue Mar 7 14:37:26 2023 +0800 system/cu: Disable echo if it's enabled to avoid double input character Signed-off-by: Huang Qi <huang...@xiaomi.com> --- system/cu/cu_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/cu/cu_main.c b/system/cu/cu_main.c index 88f6c5468..29090bd8b 100644 --- a/system/cu/cu_main.c +++ b/system/cu/cu_main.c @@ -179,6 +179,10 @@ static int set_termios(int fd, int rate, enum parity_mode parity, tio.c_oflag |= ONLCR; } + /* disable echo if it's enabled to avoid double input character */ + + tio.c_iflag &= ~ECHO; + ret = tcsetattr(fd, TCSANOW, &tio); if (ret) {