Skip to content

Commit

Permalink
Add preprocessor #ifdefs for NO_GLOBAL_SERIAL which removes dependenc…
Browse files Browse the repository at this point in the history
…y to output a deprecated API message (#408)
  • Loading branch information
craiglink committed May 8, 2024
1 parent d3b23d0 commit 8c03ef1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OLEDDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 8c03ef1

Please sign in to comment.