Skip to content

Commit

Permalink
Fix printInstructions() overriding dont_log state
Browse files Browse the repository at this point in the history
  • Loading branch information
Ancyker committed Nov 27, 2024
1 parent a4750c1 commit 2199e15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cart_Reader/Cart_Reader.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}

Expand Down

0 comments on commit 2199e15

Please sign in to comment.