Browse Source

mavlink_orb_subscription: minor optimization and comment fix

sbg
Anton Babushkin 11 years ago
parent
commit
762e8f5289
  1. 4
      src/modules/mavlink/mavlink_orb_subscription.cpp
  2. 2
      src/modules/mavlink/mavlink_orb_subscription.h

4
src/modules/mavlink/mavlink_orb_subscription.cpp

@ -98,6 +98,10 @@ MavlinkOrbSubscription::update(const hrt_abstime t)
bool bool
MavlinkOrbSubscription::is_published() MavlinkOrbSubscription::is_published()
{ {
if (_published) {
return true;
}
bool updated; bool updated;
orb_check(_fd, &updated); orb_check(_fd, &updated);

2
src/modules/mavlink/mavlink_orb_subscription.h

@ -59,7 +59,7 @@ public:
* Check if the topic has been published. * Check if the topic has been published.
* *
* This call will return true if the topic was ever 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(); bool is_published();
void *get_data(); void *get_data();

Loading…
Cancel
Save