Replacing usleep with px4_usleep

This is a step towards isolating time from the system.
This commit is contained in:
Julian Oes
2018-12-22 10:32:18 +01:00
parent e485885344
commit 5b9dea5604
112 changed files with 339 additions and 305 deletions
@@ -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);
}