mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-25 04:26:37 +08:00
Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
This commit is contained in:
@@ -103,7 +103,7 @@ GroundRoverPositionControl::~GroundRoverPositionControl()
|
||||
|
||||
do {
|
||||
/* wait 20ms */
|
||||
usleep(20000);
|
||||
px4_usleep(20000);
|
||||
|
||||
/* if we have given up, kill it */
|
||||
if (++i > 50) {
|
||||
@@ -523,7 +523,7 @@ int gnd_pos_control_main(int argc, char *argv[])
|
||||
|
||||
/* avoid memory fragmentation by not exiting start handler until the task has fully started */
|
||||
while (gnd_control::g_control == nullptr || !gnd_control::g_control->task_running()) {
|
||||
usleep(50000);
|
||||
px4_usleep(50000);
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user