uORB: Block on simulation delay for orb_check() calls as well

This commit is contained in:
Lorenz Meier
2016-02-05 16:36:43 +01:00
parent 39ee36a8ea
commit 15e7b19991
3 changed files with 11 additions and 0 deletions
+5
View File
@@ -384,6 +384,11 @@ uORB::DeviceNode::poll_notify_one(px4_pollfd_struct_t *fds, pollevent_t events)
bool
uORB::DeviceNode::appears_updated(SubscriberData *sd)
{
/* block if in simulation mode */
while (px4_sim_delay_enabled()) {
usleep(100);
}
//warnx("uORB::DeviceNode::appears_updated sd = %p", sd);
/* assume it doesn't look updated */
bool ret = false;