diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-03-16 17:28:34 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-03-16 17:28:34 +0400 |
commit | 762e8f52893afee6e8ffb6a728e5bc88518829c3 (patch) | |
tree | de1fda0b0df1a7201cdd36faed01cae972128b95 /src/modules | |
parent | df5d702baefae7f51161d170c911cb398f418538 (diff) | |
download | px4-firmware-762e8f52893afee6e8ffb6a728e5bc88518829c3.tar.gz px4-firmware-762e8f52893afee6e8ffb6a728e5bc88518829c3.tar.bz2 px4-firmware-762e8f52893afee6e8ffb6a728e5bc88518829c3.zip |
mavlink_orb_subscription: minor optimization and comment fix
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/mavlink/mavlink_orb_subscription.cpp | 4 | ||||
-rw-r--r-- | src/modules/mavlink/mavlink_orb_subscription.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/mavlink/mavlink_orb_subscription.cpp b/src/modules/mavlink/mavlink_orb_subscription.cpp index e8f9bb75b..4de722832 100644 --- a/src/modules/mavlink/mavlink_orb_subscription.cpp +++ b/src/modules/mavlink/mavlink_orb_subscription.cpp @@ -98,6 +98,10 @@ MavlinkOrbSubscription::update(const hrt_abstime t) bool MavlinkOrbSubscription::is_published() { + if (_published) { + return true; + } + bool updated; orb_check(_fd, &updated); diff --git a/src/modules/mavlink/mavlink_orb_subscription.h b/src/modules/mavlink/mavlink_orb_subscription.h index 8529721c0..5c6543e81 100644 --- a/src/modules/mavlink/mavlink_orb_subscription.h +++ b/src/modules/mavlink/mavlink_orb_subscription.h @@ -59,7 +59,7 @@ public: * Check if the topic has been published. * * This call will return true if the topic was ever published. - * @param true if the topic has been published at least once. + * @return true if the topic has been published at least once. */ bool is_published(); void *get_data(); |