diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-04 19:04:42 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-04 19:04:56 +0100 |
commit | d70ed8ad123b44667a636056fe5783944157d735 (patch) | |
tree | 15af0ef7ea55e7c4aa533e9c5e3f63a10e66cf00 /src | |
parent | d904a3ca82d2a58a67c320a2a0a698d5427098d7 (diff) | |
download | px4-firmware-d70ed8ad123b44667a636056fe5783944157d735.tar.gz px4-firmware-d70ed8ad123b44667a636056fe5783944157d735.tar.bz2 px4-firmware-d70ed8ad123b44667a636056fe5783944157d735.zip |
NSH term fix
Diffstat (limited to 'src')
-rw-r--r-- | src/systemcmds/nshterm/nshterm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemcmds/nshterm/nshterm.c b/src/systemcmds/nshterm/nshterm.c index c2ea2a1cc..ceaea35b6 100644 --- a/src/systemcmds/nshterm/nshterm.c +++ b/src/systemcmds/nshterm/nshterm.c @@ -72,7 +72,7 @@ nshterm_main(int argc, char *argv[]) /* abort if an arming topic is published and system is armed */ bool updated = false; - orb_check(armed_fd, &updated) + orb_check(armed_fd, &updated); if (updated) { /* the system is now providing arming status feedback. * instead of timing out, we resort to abort bringing @@ -90,6 +90,7 @@ nshterm_main(int argc, char *argv[]) /* which may not be ready immediately. */ fd = open(argv[1], O_RDWR); if (fd != -1) { + close(armed_fd); break; } usleep(100000); @@ -114,7 +115,7 @@ nshterm_main(int argc, char *argv[]) } /* Set ONLCR flag (which appends a CR for every LF) */ - uart_config.c_oflag |= (ONLCR | OPOST/* | OCRNL*/); + uart_config.c_oflag |= (ONLCR | OPOST); if ((termios_state = tcsetattr(fd, TCSANOW, &uart_config)) < 0) { warnx("ERR set config %s\n", argv[1]); |