diff --git a/tftdisplay.cpp b/tftdisplay.cpp index d0ee2c8..786df7c 100644 --- a/tftdisplay.cpp +++ b/tftdisplay.cpp @@ -56,30 +56,6 @@ void TFTDisplay::clear() { #endif } -void TFTDisplay::error(char *s) { - setColor(_fg); - char *lines[5]; - int l = 0; - for (char *p = s, *q = s; *p; p++) - if (*p == '\n') { - *p++ = 0; - lines[l++] = q; - q = p; - } - unsigned y = (_dy - l*_cy)/2; - for (int i = 0; i < l; i++) { - char *p = lines[i]; -#if defined(USE_UTFT) - unsigned x = (_dx - strlen(p)*_cx)/2; - utft.print(p, x, y); -#elif defined(USE_ESPI) - unsigned x = (_dx - espi.textWidth(p))/2; - espi.drawCentreString(p, x, y, 0); -#endif - y += _cy; - } -} - void TFTDisplay::status(const char *s) { setColor(_fg); diff --git a/tftdisplay.h b/tftdisplay.h index 3b22678..a9f9ed3 100644 --- a/tftdisplay.h +++ b/tftdisplay.h @@ -31,7 +31,6 @@ class TFTDisplay { public: void begin(colour_t bg, colour_t fg, orientation_t o = landscape); void clear(); - void error(char *); void status(const char *); void drawPixel(unsigned x, unsigned y, colour_t col);