diff --git a/examples/Buttons/Button_demo/Button_demo.ino b/examples/Buttons/Button_demo/Button_demo.ino index 54d76bc..47f5464 100644 --- a/examples/Buttons/Button_demo/Button_demo.ino +++ b/examples/Buttons/Button_demo/Button_demo.ino @@ -1,9 +1,9 @@ -// Button widget demo, requires display with touch screen +// Button widget demo, requires SPI display with touch screen // Requires widget library here: // https://github.com/Bodmer/TFT_eWidget -#include "FS.h" +#include #include "Free_Fonts.h" // Include the header file attached to this sketch #include // Hardware-specific library @@ -14,15 +14,15 @@ TFT_eSPI tft = TFT_eSPI(); // Invoke custom library #define CALIBRATION_FILE "/TouchCalData1" #define REPEAT_CAL false -TFT_eWidget btnL = TFT_eWidget(&tft); -TFT_eWidget btnR = TFT_eWidget(&tft); +ButtonWidget btnL = ButtonWidget(&tft); +ButtonWidget btnR = ButtonWidget(&tft); #define BUTTON_W 100 #define BUTTON_H 50 // Create an array of button instances to use in for() loops // This is more useful where large numbers of buttons are employed -TFT_eWidget* btn[] = {&btnL , &btnR};; +ButtonWidget* btn[] = {&btnL , &btnR};; uint8_t buttonCount = sizeof(btn) / sizeof(btn[0]); void btnL_pressAction(void) diff --git a/examples/Sliders/Slider_demo/Slider_demo.ino b/examples/Sliders/Slider_demo/Slider_demo.ino index 5b6147e..a31d935 100644 --- a/examples/Sliders/Slider_demo/Slider_demo.ino +++ b/examples/Sliders/Slider_demo/Slider_demo.ino @@ -4,7 +4,7 @@ // https://github.com/Bodmer/TFT_eWidget #include "FS.h" -#include + #include "Free_Fonts.h" // Include the header file attached to this sketch #include diff --git a/library.json b/library.json index 18a9fde..0ff06b6 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eWidget", - "version": "0.0.4", + "version": "0.0.5", "keywords": "Arduino, tft, display, button, gui, graph, meter, slider", "description": "A TFT GUI widget library", "repository": diff --git a/library.properties b/library.properties index 28a7ef8..b86f4af 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eWidget -version=0.0.4 +version=0.0.5 author=Bodmer maintainer=Bodmer sentence=A TFT GUI widget library diff --git a/src/TFT_eWidget.h b/src/TFT_eWidget.h index b47947c..e570f2b 100644 --- a/src/TFT_eWidget.h +++ b/src/TFT_eWidget.h @@ -11,6 +11,13 @@ //Standard support #include +// LittleFS is required for touch calibration in TFT_eSPI sketches +#if defined (ESP8266) || defined (ESP32) + #include + #include + #include +#endif + #include #include "widgets/button/ButtonWidget.h"