From 88363677673ee275d9c786606c00026ea1147870 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Sat, 10 Nov 2018 13:34:36 +0000 Subject: [PATCH] bugfixes --- hw/esp32-espi-dac.h | 2 +- hw/esp8266-pwm.h | 2 +- tftdisplay.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/esp32-espi-dac.h b/hw/esp32-espi-dac.h index 4a23868..b7892e5 100644 --- a/hw/esp32-espi-dac.h +++ b/hw/esp32-espi-dac.h @@ -1,7 +1,7 @@ // TFT display... #define USE_ESPI //#define USER_SETUP_LOADED -//#define ILI9163_DRIVER +//#define ILI9341_DRIVER //#define TFT_CS 5 //#define TFT_DC 2 //#define TFT_MOSI 23 diff --git a/hw/esp8266-pwm.h b/hw/esp8266-pwm.h index 1d758c2..eec5148 100644 --- a/hw/esp8266-pwm.h +++ b/hw/esp8266-pwm.h @@ -2,7 +2,7 @@ #define USE_ESPI //must define these in Makefile (or platformio) //#define USER_SETUP_LOADED -//#define ILI9163_DRIVER +//#define ILI9341_DRIVER //#define TFT_CS PIN_D6 //#define TFT_DC PIN_D8 //#define TFT_WIDTH 240 diff --git a/tftdisplay.cpp b/tftdisplay.cpp index 6317fe3..d0ee2c8 100644 --- a/tftdisplay.cpp +++ b/tftdisplay.cpp @@ -90,9 +90,10 @@ void TFTDisplay::status(const char *s) { utft.print(s, xs, y); _oxs = xs; #elif defined(USE_ESPI) - espi.fillRect(_oxs, _dx, _dy - _cy, _dy, _bg); + espi.fillRect(_dx - _oxs, _dy - _cy, _oxs, _cy, _bg); _oxs = espi.textWidth(s); - espi.drawRightString(s, _oxs, _dy - _cy, 0); + espi.setTextDatum(BR_DATUM); + espi.drawString(s, _dx, _dy); #endif } @@ -101,6 +102,6 @@ void TFTDisplay::drawPixel(unsigned x, unsigned y, colour_t col) { utft.setColor(col); utft.drawPixel(x, y); #elif defined(USE_ESPI) - espi.drawPixel(_dx - x, y, col); + espi.drawPixel(x, y, col); #endif }