-
-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler error: 'class TFT_eSPI_Button' has no member named 'drawButton2' #2
Comments
@tobozo Thank you for reminding me. I did extend the TFT_eSPI library by adding the drawButton2 function. I can't remember off the top of my head what I have it doing but I will let you know as soon as I sit down at my project PC. To verify your wiring, check the schematic I included in the repo. The connections on the marauder may be different from the connections you made on your lolin but the inter-pin connections on the TFT will most likely be the issue. Just check and see which pins are part of the same Net on my schematic. Also check to make sure the tft screen has the touch controller chip on the back. I know some manufacturers ship these screens without the touch controller. PS. Great job getting it working. Thanks for sharing the picture and the progress. |
@tobozo void drawButton2( String button_name = "", boolean inverted = false); and this is my void TFT_eSPI_Button::drawButton2(String button_name, boolean inverted) {
uint16_t fill, outline, text;
if(!inverted) {
fill = _fillcolor;
outline = _outlinecolor;
text = _textcolor;
} else {
fill = _textcolor;
outline = _outlinecolor;
text = _fillcolor;
}
uint8_t r = min(_w, _h) / 4; // Corner radius
_gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill);
_gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline);
_gfx->setTextColor(text);
_gfx->setTextSize(_textsize);
uint8_t tempdatum = _gfx->getTextDatum();
_gfx->setTextDatum(ML_DATUM);
if (button_name == "")
_gfx->drawString(_label, _x1 + 22, _y1 + (_h/2));
else
_gfx->drawString(button_name, _x1 + 22, _y1 + (_h/2));
_gfx->setTextDatum(tempdatum);
} |
@justcallmekoko thanks! turns out T_CS was wired to the wrong pin 🤦♂️ so touch support is now tested and working as a charm 🎉 |
when trying to upload the code I skip this in menufunctions.cpp |
when trying to upload the code I skip this in menufunctions.cpp Same here unfortunately... |
ok, you'll have to config Bodmer's TFT_eSPI library take a look here: |
Display.h |
thx@koko great work! |
I have this same issue. I configured Bodmer's library by commenting and uncommenting the proper lines in User_Setup_Select.h, and I uncommented line 50 in Display.h. Is there anything else I'm missing? |
If you use the ILI9341, uncomment this in User_Setup_Select.h : (Line 22) #define ILI9341_DRIVER AND this (Line 162; Pins according to "koko's" wiring diagram) // ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### // For ESP32 Dev board (only tested with ILI9341 display) #define TFT_MISO 19 #define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin) #define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen //#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only |
That fixed the issue, thanks! |
a lot of library errors, give someone realties all the necessary libraries for this project in the archive Arduino: 1.8.13 (Windows 10), Плата:"ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 921600, None" Несколько библиотек найдено для "WiFi.h" In file included from c:\users\dmitriy\documents\arduino\libraries\lvgl\src/lv_misc/lv_log.h:16:0, Используется: C:\Users\Dmitriy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\libraries\WiFi
Не используется: C:\Program Files\libraries\WiFi
Несколько библиотек найдено для "SD.h"
Используется: C:\Users\Dmitriy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\libraries\SD Не используется: C:\Program Files\libraries\SD
c:\users\dmitriy\documents\arduino\libraries\lvgl\src\lv_conf_internal.h:40:101: fatal error: ../../lv_conf.h: No such file or directory compilation terminated. exit status 1 Ошибка компиляции для платы ESP32 Wrover Module. Этот отчёт будет иметь больше информации с |
the best I could come up with to end this error was to add this function to TFT_eSPI, not sure what yours is doing though:
looks like it can't be wrapped outside TFT_eSPI anyway
[edit] User_Setup.h for LoLin D32 Pro, just in case someone needs it
The text was updated successfully, but these errors were encountered: