Fixed code format issues

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2017-01-09 12:43:28 -08:00
committed by Lorenz Meier
parent 00a6fab5a2
commit f529069368
6 changed files with 29 additions and 10 deletions
+2
View File
@@ -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;
}
/*
+3
View File
@@ -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);
}