uORB move to standalone CDev

- uORB topics should not be Devices with bus, address, device id
This commit is contained in:
Daniel Agar
2018-08-18 15:03:57 -04:00
parent a2f4757e31
commit dbf2d25e2f
9 changed files with 49 additions and 68 deletions

View File

@@ -187,11 +187,8 @@ orb_advert_t uORB::Manager::orb_advertise_multi(const struct orb_metadata *meta,
#endif /* ORB_USE_PUBLISHER_RULES */
int result, fd;
orb_advert_t advertiser;
/* open the node as an advertiser */
fd = node_open(meta, data, true, instance, priority);
int fd = node_open(meta, data, true, instance, priority);
if (fd == PX4_ERROR) {
PX4_ERR("%s advertise failed", meta->o_name);
@@ -201,13 +198,15 @@ orb_advert_t uORB::Manager::orb_advertise_multi(const struct orb_metadata *meta,
/* Set the queue size. This must be done before the first publication; thus it fails if
* this is not the first advertiser.
*/
result = px4_ioctl(fd, ORBIOCSETQUEUESIZE, (unsigned long)queue_size);
int result = px4_ioctl(fd, ORBIOCSETQUEUESIZE, (unsigned long)queue_size);
if (result < 0 && queue_size > 1) {
PX4_WARN("orb_advertise_multi: failed to set queue size");
}
/* get the advertiser handle and close the node */
orb_advert_t advertiser;
result = px4_ioctl(fd, ORBIOCGADVERTISER, (unsigned long)&advertiser);
px4_close(fd);
@@ -357,7 +356,8 @@ int uORB::Manager::node_open(const struct orb_metadata *meta, const void *data,
int priority)
{
char path[orb_maxpath];
int fd = -1, ret;
int fd = -1;
int ret = -1;
/*
* If meta is null, the object was not defined, i.e. it is not