mavlink fix code style

This commit is contained in:
Daniel Agar
2017-01-07 01:03:18 -05:00
parent c280358e32
commit c9956e25b4
9 changed files with 80 additions and 27 deletions
@@ -171,12 +171,15 @@ MavlinkOrbSubscription::is_published()
_last_pub_check = now;
#if defined(__PX4_QURT) || defined(__PX4_POSIX_EAGLE)
// Snapdragon has currently no support for orb_exists, therefore
// we're not using it.
if (_fd < 0) {
_fd = orb_subscribe_multi(_topic, _instance);
}
#else
// We don't want to subscribe to anything that does not exist
// in order to save memory and file descriptors.
// However, for some topics like vehicle_command_ack, we want to subscribe
@@ -188,6 +191,7 @@ MavlinkOrbSubscription::is_published()
if (_fd < 0) {
_fd = orb_subscribe_multi(_topic, _instance);
}
#endif
bool updated;
@@ -199,6 +203,7 @@ MavlinkOrbSubscription::is_published()
// topic may have been last published before we subscribed
uint64_t time_topic = 0;
if (!_published && orb_stat(_fd, &time_topic) == PX4_OK) {
if (time_topic != 0) {
_published = true;