Subsystem_info status flags & checks : Initial commit, updating the health flags in a centralized way mostly in commander and the votedSensorsUpdate function.

This commit is contained in:
Philipp Oettershagen
2018-04-03 16:36:33 +02:00
committed by Beat Küng
parent 40e6a5a39b
commit 6f1f414b49
31 changed files with 427 additions and 266 deletions
+7 -2
View File
@@ -148,8 +148,13 @@ uORB::DeviceNode::open(device::file_t *filp)
return -ENOMEM;
}
/* default to no pending update */
sd->generation = _generation;
/* If queue size >1, allow the subscriber to read the data in the queue. Otherwise, assume subscriber is up to date.*/
if (_queue_size <= 1) {
sd->generation = _generation;
} else {
sd->generation = _generation - (_queue_size < _generation ? _queue_size : _generation);
}
/* set priority */
sd->set_priority(_priority);