sensors: handle timeout

This commit is contained in:
Julian Oes
2018-12-22 10:32:18 +01:00
parent 22bd06e5d5
commit 9b7857315c
+5 -1
View File
@@ -631,6 +631,11 @@ Sensors::run()
int pret = px4_poll(&poll_fds, 1, 50);
/* if pret == 0 it timed out - periodic check for should_exit(), etc. */
if (pret == 0) {
continue;
}
/* this is undesirable but not much we can do - might want to flag unhappy status */
if (pret < 0) {
@@ -642,7 +647,6 @@ Sensors::run()
}
px4_usleep(1000);
continue;
}