Test time difference in safe way

This commit is contained in:
Scott Lahteine
2016-04-10 15:55:12 -07:00
parent 562e281c73
commit 386140f361
9 changed files with 60 additions and 57 deletions

View File

@ -508,7 +508,7 @@ void CardReader::write_command(char *buf) {
}
void CardReader::checkautostart(bool force) {
if (!force && (!autostart_stilltocheck || next_autostart_ms < millis()))
if (!force && (!autostart_stilltocheck || ELAPSED(millis(), next_autostart_ms)))
return;
autostart_stilltocheck = false;