mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 01:13:34 +08:00
Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
This commit is contained in:
@@ -387,7 +387,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
|
||||
} else {
|
||||
//wait for parameter changes. We still need to wake up regularily to check for thread exit requests
|
||||
usleep(1e6);
|
||||
px4_usleep(1e6);
|
||||
}
|
||||
|
||||
if (test_input && test_input->finished()) {
|
||||
@@ -478,7 +478,7 @@ int vmount_main(int argc, char *argv[])
|
||||
int counter = 0;
|
||||
|
||||
while (!thread_running && vmount_task >= 0) {
|
||||
usleep(5000);
|
||||
px4_usleep(5000);
|
||||
|
||||
if (++counter >= 100) {
|
||||
break;
|
||||
@@ -504,7 +504,7 @@ int vmount_main(int argc, char *argv[])
|
||||
thread_should_exit = true;
|
||||
|
||||
while (thread_running) {
|
||||
usleep(100000);
|
||||
px4_usleep(100000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user