mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 12:33:33 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user