Restore test

PR#2572 Changed this because of faulty Boolean Logic

NOT(A OR (NOT B) OR (NOT C)) !=

(NOT A) AND ((NOT B) OR C))


Besides, the compiler should be smart enough to
optimize this without help from the programmer
This commit is contained in:
Richard Wackerbarth 2015-08-04 15:22:56 -05:00
parent 3c7470dbc3
commit 35afea1c0e

View file

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