Rover: improved loop() latency

This commit is contained in:
Andrew Tridgell 2013-10-08 11:26:04 +11:00
parent 1e7af3e101
commit 42255ebbc6
1 changed files with 2 additions and 4 deletions

View File

@ -623,10 +623,8 @@ void loop()
fast_loopTimeStamp = millis();
scheduler.run(19000U);
}
if ((timer - fast_loopTimer) <= 19) {
// we have plenty of time - be friendly to multi-tasking OSes
hal.scheduler->delay(1);
} else {
hal.scheduler->delay_microseconds(500);
}
}