From 8c03ef1d36e85ecf7db08a22538b8bf4b22eda83 Mon Sep 17 00:00:00 2001 From: Craig Link <278699+craiglink@users.noreply.github.com> Date: Wed, 8 May 2024 00:48:20 -0700 Subject: [PATCH] Add preprocessor #ifdefs for NO_GLOBAL_SERIAL which removes dependency to output a deprecated API message (#408) --- src/OLEDDisplay.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OLEDDisplay.cpp b/src/OLEDDisplay.cpp index 3a0c009..13016b2 100644 --- a/src/OLEDDisplay.cpp +++ b/src/OLEDDisplay.cpp @@ -826,7 +826,9 @@ void OLEDDisplay::clear(void) { } void OLEDDisplay::drawLogBuffer(uint16_t xMove, uint16_t yMove) { +#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL) Serial.println("[deprecated] Print functionality now handles buffer management automatically. This is a no-op."); +#endif } void OLEDDisplay::drawLogBuffer() { @@ -879,7 +881,9 @@ void OLEDDisplay::cls() { } bool OLEDDisplay::setLogBuffer(uint16_t lines, uint16_t chars) { +#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL) Serial.println("[deprecated] Print functionality now handles buffer management automatically. This is a no-op."); +#endif return true; }