mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-24 06:06:36 +08:00
mavlink fix code style
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user