diff --git a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp index a40702660..dbfd00e2d 100644 --- a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp +++ b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp @@ -1579,7 +1579,7 @@ void Adafruit_GFX_Button::initButtonUL( strncpy(_label, label, 9); } -void draw_picture(char *path, uint32_t xp, uint32_t yp, uint32_t xs, uint32_t ys, bool inverted); +void draw_picture(char *path, uint32_t xp, uint32_t yp, uint32_t xs, uint32_t ys, uint32_t ocolor, bool inverted); /**************************************************************************/ /*! @@ -1601,8 +1601,7 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) { } if (_label[0]=='/') { - // picture path - draw_picture(_label, _x1, _y1, _w, _h, inverted); + draw_picture(_label, _x1, _y1, _w, _h, outline, inverted); _gfx->drawRect(_x1, _y1, _w, _h, text); } else { uint8_t r = min(_w, _h) / 4; // Corner radius diff --git a/lib/lib_display/Adafruit_SSD1351-gemu-1.0/SSD1351.cpp b/lib/lib_display/Adafruit_SSD1351-gemu-1.0/SSD1351.cpp index c822fe565..891a573d5 100644 --- a/lib/lib_display/Adafruit_SSD1351-gemu-1.0/SSD1351.cpp +++ b/lib/lib_display/Adafruit_SSD1351-gemu-1.0/SSD1351.cpp @@ -514,7 +514,7 @@ void SSD1351::setAddrWindow(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) if (flag) stop(); } -void SSD1351::pushColors(uint16_t *data, uint8_t len, boolean first) { +void SSD1351::pushColors(uint16_t *data, uint16_t len, boolean first) { for (uint16_t b=0; b>8); + +#else + //waitWriteFifo(); writeData(color&0xff); //waitWriteFifo(); writeData(color>>8); - +#endif } + //RA8876_CS_HIGH SPI.endTransaction(); } diff --git a/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.h b/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.h index 5bf8b404f..14b821471 100644 --- a/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.h +++ b/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.h @@ -472,7 +472,7 @@ class RA8876 : public Renderer { int getCursorY(void); void setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); - void pushColors(uint16_t *data, uint8_t len, boolean first); + void pushColors(uint16_t *data, uint16_t len, boolean first); // Text void selectInternalFont(enum FontSize size, enum FontEncoding enc = RA8876_FONT_ENCODING_8859_1); diff --git a/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.cpp b/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.cpp index 1b78aaa9a..bd3f83c86 100644 --- a/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.cpp +++ b/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.cpp @@ -66,7 +66,7 @@ void Renderer::dim(uint8_t contrast) { } -void Renderer::pushColors(uint16_t *data, uint8_t len, boolean first) { +void Renderer::pushColors(uint16_t *data, uint16_t len, boolean first) { } diff --git a/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.h b/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.h index 0685b9bb1..261363956 100644 --- a/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.h +++ b/lib/lib_display/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.h @@ -33,7 +33,7 @@ public: virtual void Begin(int16_t p1,int16_t p2,int16_t p3); virtual void Updateframe(); virtual void dim(uint8_t contrast); - virtual void pushColors(uint16_t *data, uint8_t len, boolean first); + virtual void pushColors(uint16_t *data, uint16_t len, boolean first); virtual void setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); virtual void invertDisplay(boolean i); void setDrawMode(uint8_t mode); diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 261904bd5..339aab26d 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -1913,6 +1913,10 @@ chknext: fvar = RtcTime.day_of_month; goto exit; } + if (!strncmp(vname, "dvnm", 4)) { + if (sp) strlcpy(sp, SettingsText(SET_DEVICENAME), glob_script_mem.max_ssize); + goto strexit; + } break; case 'e': if (!strncmp(vname, "epoch", 5)) { @@ -2367,6 +2371,7 @@ chknext: goto strexit; } break; + case 'g': if (!strncmp(vname, "gtmp", 4)) { fvar = TasmotaGlobal.temperature_celsius; diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 6e5e7a138..a6e81b711 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -1543,7 +1543,7 @@ void CmndDisplayRows(void) #ifdef USE_TOUCH_BUTTONS // very limited path size, so, add .jpg -void draw_picture(char *path, uint32_t xp, uint32_t yp, uint32_t xs, uint32_t ys, bool inverted) { +void draw_picture(char *path, uint32_t xp, uint32_t yp, uint32_t xs, uint32_t ys, uint32_t ocol, bool inverted) { char ppath[16]; strcpy(ppath, path); uint8_t plen = strlen(path) -1; @@ -1554,7 +1554,11 @@ char ppath[16]; } inverted = false; } - strcat(ppath, ".jpg"); + if (ocol == 9) { + strcat(ppath, ".rgb"); + } else { + strcat(ppath, ".jpg"); + } Draw_RGB_Bitmap(ppath, xp, yp, inverted); } #endif diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino index 40ece33c9..a1694620e 100644 --- a/tasmota/xdrv_50_filesystem.ino +++ b/tasmota/xdrv_50_filesystem.ino @@ -48,7 +48,9 @@ The driver enabled by #define USE_UFILESYS #define SDCARD_CS_PIN 4 #endif +#ifdef ESP32 #define FFS_2 +#endif #ifdef ESP8266 #include @@ -428,8 +430,8 @@ void UFSdirectory(void) { char ts[16]; char fs[16]; - UFS_form1000(ufs_fsinfo(0, ufs_dir == 1 ? 0:1), ts, '.'); - UFS_form1000(ufs_fsinfo(1, ufs_dir == 1 ? 0:1), fs, '.'); + UFS_form1000(ufs_fsinfo(0, ufs_dir == 2 ? 1:0), ts, '.'); + UFS_form1000(ufs_fsinfo(1, ufs_dir == 2 ? 1:0), fs, '.'); WSContentSend_P(UFS_FORM_FILE_UPGc, WebColor(COL_TEXT), ts, fs);