mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-12 15:40:35 +08:00
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:
committed by
Beat Küng
parent
40e6a5a39b
commit
6f1f414b49
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user