POSIX: Fixes for HRT implementation of simulated HW clock polling

There is a race condition for the accel and mag polling rates.
Whichever one gets set first, the other will be uninitialized.

Set the mag polling rate to 1ms if uninitilized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-02 16:55:34 +00:00
parent cced8ed69e
commit 5e95b83eff
11 changed files with 213 additions and 63 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ static void work_process(FAR struct wqueue_s *wqueue, int lock_id)
*/
elapsed = USEC2TICK(clock_systimer() - work->qtime);
//printf("work_process: in ticks elapsed=%lu delay=%u\n", elapsed, work->delay);
//PX4_INFO("work_process: queue=%p in ticks elapsed=%lu delay=%u time=%u", wqueue, elapsed, work->delay,clock_systimer());
if (elapsed >= work->delay)
{
/* Remove the ready-to-execute work from the list */