diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-01-14 15:47:33 +0100 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-01-14 15:47:33 +0100 |
commit | 8ab3870a0d70de7f20d7a22930acf9256279da04 (patch) | |
tree | 2d252185a42f077c82859b73ae3883e58d4d964b /src/modules/sdlog2/sdlog2.c | |
parent | 97e4522c76c7859f893c7159f7a86f586fd0789b (diff) | |
parent | 14c0fae175452da6e28ffc20b265de621a2430ba (diff) | |
download | px4-firmware-8ab3870a0d70de7f20d7a22930acf9256279da04.tar.gz px4-firmware-8ab3870a0d70de7f20d7a22930acf9256279da04.tar.bz2 px4-firmware-8ab3870a0d70de7f20d7a22930acf9256279da04.zip |
Merge branch 'navigator_new' into navigator_new_vector
Diffstat (limited to 'src/modules/sdlog2/sdlog2.c')
-rw-r--r-- | src/modules/sdlog2/sdlog2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index 49f8add8b..efdb5293a 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -990,7 +990,9 @@ int sdlog2_thread_main(int argc, char *argv[]) if (fds[ifds++].revents & POLLIN) { /* don't orb_copy, it's already done few lines above */ /* copy control mode here to construct STAT message */ - orb_copy(ORB_ID(vehicle_control_mode), subs.control_mode_sub, &buf.control_mode); + if (fds[ifds].revents & POLLIN) { + orb_copy(ORB_ID(vehicle_control_mode), subs.control_mode_sub, &buf.control_mode); + } log_msg.msg_type = LOG_STAT_MSG; log_msg.body.log_STAT.main_state = (uint8_t) buf.control_mode.main_state; log_msg.body.log_STAT.navigation_state = (uint8_t) buf.control_mode.nav_state; |