Skip to content

Commit

Permalink
Restore test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Wackerbarth committed Aug 4, 2015
1 parent 3c7470d commit 35afea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Marlin/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ void CardReader::write_command(char *buf) {
}

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;

Expand Down

0 comments on commit 35afea1

Please sign in to comment.