mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 04:07:36 +08:00
Fixed code format issues
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Lorenz Meier
parent
00a6fab5a2
commit
f529069368
@@ -492,9 +492,11 @@ int uORB::DeviceNode::unadvertise(orb_advert_t handle)
|
||||
int16_t uORB::DeviceNode::topic_advertised(const orb_metadata *meta, int priority)
|
||||
{
|
||||
uORBCommunicator::IChannel *ch = uORB::Manager::get_instance()->get_uorb_communicator();
|
||||
|
||||
if (ch != nullptr && meta != nullptr) {
|
||||
return ch->topic_advertised(meta->o_name);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -136,9 +136,11 @@ int uORB::Manager::orb_exists(const struct orb_metadata *meta, int instance)
|
||||
return stat(path, &buffer);
|
||||
#else
|
||||
ret = px4_access(path, F_OK);
|
||||
|
||||
if (ret == -1 && meta != nullptr && _remote_topics.size() > 0) {
|
||||
ret = (_remote_topics.find(meta->o_name) != _remote_topics.end()) ? OK : ERROR;
|
||||
}
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
@@ -446,6 +448,7 @@ int16_t uORB::Manager::process_remote_topic(const char *topic_name, bool isAdver
|
||||
|
||||
if (isAdvertisement) {
|
||||
_remote_topics.insert(topic_name);
|
||||
|
||||
} else {
|
||||
_remote_topics.erase(topic_name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user