module: increase max timeout for stopping modules from 2s to 5s

The gps module might take up to 4s to stop (if stopped during module
configuration).
This commit is contained in:
Beat Küng 2020-08-27 16:15:43 +02:00 committed by Daniel Agar
parent 531242468e
commit 2956aa340e

View File

@ -239,10 +239,12 @@ public:
do {
unlock_module();
px4_usleep(20000); // 20 ms
px4_usleep(10000); // 10 ms
lock_module();
if (++i > 100 && _task_id != -1) { // wait at most 2 sec
if (++i > 500 && _task_id != -1) { // wait at most 5 sec
PX4_ERR("timeout, forcing stop");
if (_task_id != task_id_is_work_queue) {
px4_task_delete(_task_id);
}