mc_pos_control: run the loop without position data

By running the loop in mc_pos_control without successfully polling on
position data, we still copy the manual input over so that
mc_att_control can consume it. This allows to fly in manual mode without
GPS and no position estimate.
This commit is contained in:
Julian Oes
2016-06-15 13:34:27 +01:00
parent 26b7ac3884
commit d9d5d9d9e4
@@ -1231,12 +1231,12 @@ MulticopterPositionControl::task_main()
fds[0].events = POLLIN;
while (!_task_should_exit) {
/* wait for up to 500ms for data */
int pret = px4_poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 500);
/* wait for up to 20ms for data */
int pret = px4_poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 20);
/* timed out - periodic check for _task_should_exit */
if (pret == 0) {
continue;
// Go through the loop anyway to copy manual input at 50 Hz.
}
/* this is undesirable but not much we can do */