From 2199e15e038c17717fd1cee09dceef6b75096990 Mon Sep 17 00:00:00 2001 From: Ancyker Date: Wed, 27 Nov 2024 12:37:22 -0500 Subject: [PATCH] Fix `printInstructions()` overriding `dont_log` state --- Cart_Reader/Cart_Reader.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index b61c5cb..2ee979c 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -888,6 +888,7 @@ void printInstructions() { #ifdef ENABLE_GLOBAL_LOG // Disable log to prevent unnecessary logging + bool wasnt_logging = dont_log; // Remember if we were logging or not dont_log = true; #endif #if defined(ENABLE_OLED) @@ -903,7 +904,7 @@ void printInstructions() { display_Update(); #ifdef ENABLE_GLOBAL_LOG // Enable log again - dont_log = false; + dont_log = wasnt_logging; // Return to original state #endif }