mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
531242468e
commit
2956aa340e
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user