[ardrone2] wait using a for loop of usleep, not only one

This commit is contained in:
Gautier Hattenberger
2014-12-15 11:09:11 +01:00
parent 489771a240
commit 04d474a1cd
+5 -1
View File
@@ -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;