Plane: improved latency of main loop

use a 500usec delay
This commit is contained in:
Andrew Tridgell 2013-10-08 11:25:15 +11:00
parent e6af7dad3d
commit 48ed480d59
1 changed files with 2 additions and 4 deletions

View File

@ -783,10 +783,8 @@ void loop()
// the first call to the scheduler they won't run on a later
// call until scheduler.tick() is called again
scheduler.run(19000U);
}
if ((timer - fast_loopTimer_ms) <= 19) {
// we have plenty of time - be friendly to multi-tasking OSes
hal.scheduler->delay(1);
} else {
hal.scheduler->delay_microseconds(500);
}
}