Fix printInstructions() overriding dont_log state

This commit is contained in:
Ancyker 2024-11-27 12:37:22 -05:00
parent a4750c1fcb
commit 2199e15e03
No known key found for this signature in database
GPG Key ID: 841A6B28CD25A744

View File

@ -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
}