forked from Archive/PX4-Autopilot
uORB::DeviceNode mark advertised on write
- this is a workaround if multiple publishers for the same topic exists and one unadvertises (eg uORB::Publication destruction)
This commit is contained in:
parent
efc6a5036b
commit
ce67fee6b9
|
@ -219,14 +219,16 @@ uORB::DeviceNode::write(cdev::file_t *filp, const char *buffer, size_t buflen)
|
|||
|
||||
memcpy(_data + (_meta->o_size * (generation % _queue_size)), buffer, _meta->o_size);
|
||||
|
||||
/* Mark at least one data has been published */
|
||||
_data_valid = true;
|
||||
|
||||
mark_as_advertised();
|
||||
|
||||
// callbacks
|
||||
for (auto item : _callbacks) {
|
||||
item->call();
|
||||
}
|
||||
|
||||
/* Mark at least one data has been published */
|
||||
_data_valid = true;
|
||||
|
||||
ATOMIC_LEAVE;
|
||||
|
||||
/* notify any poll waiters */
|
||||
|
|
Loading…
Reference in New Issue