mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 14:41:35 +08:00
Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
This commit is contained in:
@@ -703,7 +703,7 @@ pwm_main(int argc, char *argv[])
|
||||
|
||||
/* Delay longer than the max Oneshot duration */
|
||||
|
||||
usleep(2542);
|
||||
px4_usleep(2542);
|
||||
|
||||
#ifdef __PX4_NUTTX
|
||||
/* Trigger all timer's channels in Oneshot mode to fire
|
||||
@@ -828,13 +828,13 @@ err_out_no_test:
|
||||
}
|
||||
|
||||
if (phase == 1) {
|
||||
usleep(steps_timings_us[steps_timing_index] / phase_maxcount);
|
||||
px4_usleep(steps_timings_us[steps_timing_index] / phase_maxcount);
|
||||
|
||||
} else if (phase == 0) {
|
||||
usleep(50000);
|
||||
px4_usleep(50000);
|
||||
|
||||
} else if (phase == 2) {
|
||||
usleep(50000);
|
||||
px4_usleep(50000);
|
||||
|
||||
} else {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user