Skip to content

Commit 8c03ef1

Browse files
authored
Add preprocessor #ifdefs for NO_GLOBAL_SERIAL which removes dependency to output a deprecated API message (#408)
1 parent d3b23d0 commit 8c03ef1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/OLEDDisplay.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,9 @@ void OLEDDisplay::clear(void) {
826826
}
827827

828828
void OLEDDisplay::drawLogBuffer(uint16_t xMove, uint16_t yMove) {
829+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
829830
Serial.println("[deprecated] Print functionality now handles buffer management automatically. This is a no-op.");
831+
#endif
830832
}
831833

832834
void OLEDDisplay::drawLogBuffer() {
@@ -879,7 +881,9 @@ void OLEDDisplay::cls() {
879881
}
880882

881883
bool OLEDDisplay::setLogBuffer(uint16_t lines, uint16_t chars) {
884+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
882885
Serial.println("[deprecated] Print functionality now handles buffer management automatically. This is a no-op.");
886+
#endif
883887
return true;
884888
}
885889

0 commit comments

Comments
 (0)