Plane: be friendly to multi-tasking OSes

This commit is contained in:
Andrew Tridgell 2013-09-28 20:09:52 +10:00
parent 8a699f6189
commit f68778d453

View File

@ -786,6 +786,10 @@ void loop()
// 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);
}
}
// Main loop 50Hz