From 35afea1c0eceb43b20ec01d257ef206673f7b833 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Tue, 4 Aug 2015 15:22:56 -0500 Subject: [PATCH] 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 --- Marlin/cardreader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 034326bde..8bb22c8a2 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -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;