diff --git a/display.cpp b/display.cpp index 5daa302..bb25a4f 100644 --- a/display.cpp +++ b/display.cpp @@ -179,7 +179,8 @@ void Display::drawLine(unsigned x1, unsigned y1, unsigned x2, unsigned y2, colou #elif defined(USE_ESPI) espi.drawLine(x1, y1, x2, y2, col); #elif defined(USE_VGA) - canvas.drawLine(x1, y1, x2, y2, rgb(col)); + canvas.setPenColor(rgb(col)); + canvas.drawLine(x1, y1, x2, y2); #endif } @@ -192,7 +193,7 @@ void Display::drawCircle(unsigned x, unsigned y, unsigned r, colour_t col) { #elif defined(USE_ESPI) espi.drawCircle(x, y, r, col); #elif defined(USE_VGA) - canvas.setBrushColor(col); + canvas.setBrushColor(rgb(col)); canvas.fillEllipse(x, y, r, r); #endif } @@ -206,7 +207,7 @@ void Display::fillCircle(unsigned x, unsigned y, unsigned r, colour_t col) { #elif defined(USE_ESPI) espi.fillCircle(x, y, r, col); #elif defined(USE_VGA) - canvas.setPenColor(col); + canvas.setPenColor(rgb(col)); canvas.drawEllipse(x, y, r, r); #endif } @@ -220,7 +221,7 @@ void Display::drawRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo #elif defined(USE_ESPI) espi.drawRect(x, y, w, h, col); #elif defined(USE_VGA) - canvas.setBrushColor(col); + canvas.setBrushColor(rgb(col)); canvas.fillRectangle(x, y, x+w, y+h); #endif } @@ -234,7 +235,7 @@ void Display::fillRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo #elif defined(USE_ESPI) espi.fillRect(x, y, w, h, col); #elif defined(USE_VGA) - canvas.setPenColor(col); + canvas.setPenColor(rgb(col)); canvas.drawRectangle(x, y, x+w, y+h); #endif } @@ -247,15 +248,10 @@ void Display::drawString(const char *s, unsigned x, unsigned y, colour_t col) { utft.print(s, x, y); #elif defined(USE_ESPI) espi.setTextDatum(TL_DATUM); - /* - unsigned w = espi.textWidth(s); - espi.fillRect(x, y, w, _cy, _bg); - espi.drawString(s, x, y); - */ espi.setTextColor(col, _bg, true); espi.drawString(s, x, y); #elif defined(USE_VGA) - canvas.setPenColor(col); + canvas.setPenColor(rgb(col)); canvas.drawText(x, y, s); #endif } diff --git a/flash_filer.cpp b/flash_filer.cpp index 05847c0..74f4a43 100644 --- a/flash_filer.cpp +++ b/flash_filer.cpp @@ -12,7 +12,9 @@ #include "filer.h" #include "flash_filer.h" +#if defined(USE_SPIFFS) || defined(USE_LITTLEFS) static File files[MAX_FILES]; +#endif #if defined(USE_SPIFFS) static File dir; diff --git a/hw/esp8bit.h b/hw/esp8bit.h index 9c52995..ad351f2 100644 --- a/hw/esp8bit.h +++ b/hw/esp8bit.h @@ -28,10 +28,12 @@ #define SPIRAM_SIZE 0x8000u // flash storage +#if !defined(NO_STORAGE) #undef USE_SD //#define SD_CS D0 #undef USE_SPIFFS #define USE_LITTLEFS +#endif // sound #define PWM_SOUND D2