mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 05:42:49 +08:00
[ardrone2] wait using a for loop of usleep, not only one
This commit is contained in:
@@ -329,7 +329,11 @@ static void mag_freeze_check(void)
|
||||
//DOWNLINK_SEND_STATE_FILTER_STATUS(DefaultChannel, DefaultDevice, &mde, &val);
|
||||
|
||||
// wait 40ms to retrieve data
|
||||
usleep(40000);
|
||||
// using 40 times a 1ms wait in case the usleep function
|
||||
// is interupted by a signal
|
||||
for (int i = 0; i < 40; i++) {
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
// restart acquisition
|
||||
cmd = 0x01;
|
||||
|
||||
Reference in New Issue
Block a user