mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-27 05:21:53 +01:00
Fix printInstructions()
overriding dont_log
state
This commit is contained in:
parent
a4750c1fcb
commit
2199e15e03
@ -888,6 +888,7 @@ void printInstructions() {
|
|||||||
|
|
||||||
#ifdef ENABLE_GLOBAL_LOG
|
#ifdef ENABLE_GLOBAL_LOG
|
||||||
// Disable log to prevent unnecessary logging
|
// Disable log to prevent unnecessary logging
|
||||||
|
bool wasnt_logging = dont_log; // Remember if we were logging or not
|
||||||
dont_log = true;
|
dont_log = true;
|
||||||
#endif
|
#endif
|
||||||
#if defined(ENABLE_OLED)
|
#if defined(ENABLE_OLED)
|
||||||
@ -903,7 +904,7 @@ void printInstructions() {
|
|||||||
display_Update();
|
display_Update();
|
||||||
#ifdef ENABLE_GLOBAL_LOG
|
#ifdef ENABLE_GLOBAL_LOG
|
||||||
// Enable log again
|
// Enable log again
|
||||||
dont_log = false;
|
dont_log = wasnt_logging; // Return to original state
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user