diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-04 18:54:01 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-04 18:54:01 +0100 |
commit | d904a3ca82d2a58a67c320a2a0a698d5427098d7 (patch) | |
tree | 3cc2569049e8ec3a34b008eeed4841b39e2a46a9 /src/systemcmds/nshterm | |
parent | 1cc92c03612c504414092bc6742bb17c812ce9c6 (diff) | |
parent | 552ff809693d340ba6f5fed6837b99effe8bf2c3 (diff) | |
download | px4-firmware-d904a3ca82d2a58a67c320a2a0a698d5427098d7.tar.gz px4-firmware-d904a3ca82d2a58a67c320a2a0a698d5427098d7.tar.bz2 px4-firmware-d904a3ca82d2a58a67c320a2a0a698d5427098d7.zip |
Merge branch 'master' into sdlog2_rtc
Diffstat (limited to 'src/systemcmds/nshterm')
-rw-r--r-- | src/systemcmds/nshterm/nshterm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/systemcmds/nshterm/nshterm.c b/src/systemcmds/nshterm/nshterm.c index edeb5c624..c2ea2a1cc 100644 --- a/src/systemcmds/nshterm/nshterm.c +++ b/src/systemcmds/nshterm/nshterm.c @@ -66,20 +66,18 @@ nshterm_main(int argc, char *argv[]) int fd = -1; int armed_fd = orb_subscribe(ORB_ID(actuator_armed)); struct actuator_armed_s armed; - /* we assume the system does not provide arming status feedback */ - bool armed_updated = false; - /* try the first 30 seconds or if arming system is ready */ - while ((retries < 300) || armed_updated) { + /* try to bring up the console - stop doing so if the system gets armed */ + while (true) { /* abort if an arming topic is published and system is armed */ bool updated = false; - if (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 * up the terminal. */ - armed_updated = true; orb_copy(ORB_ID(actuator_armed), armed_fd, &armed); if (armed.armed) { |