I'm not sure that this is the correct category to ask for help. If so, please correct me and tell me which category to use.
I have a simple sketch which worked back in February. It doesn't work now.
The sketch uses the Bodmer applied TFT_eSPI Library, with User_Setup_Select, User_Setup, and User_Setups.
I get error messages from TFT_eSPI.cpp, and TFT_eSPI.h related to specifying text background color and text color in the following:
C:\Users\Jerry Renken\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:2726:6: error: prototype for 'void TFT_eSPI::setTextColor(uint16_t, uint16_t)' does not match any in class 'TFT_eSPI'
void TFT_eSPI::setTextColor(uint16_t c, uint16_t b)
In file included from C:\Users\Jerry Renken\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:17:0:
C:\Users\Jerry Renken\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.h:586:12: error: candidates are: void TFT_eSPI::setTextColor(uint16_t, uint16_t, bool)
setTextColor(uint16_t fgcolor, uint16_t bgcolor, bool bgfill = false), // Set character (glyph) foreground and background colour, optional background fill for smooth fonts
C:\Users\Jerry Renken\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:2714:6: error: void TFT_eSPI::setTextColor(uint16_t)
void TFT_eSPI::setTextColor(uint16_t c)
I don't know how to correct this problem related to TFT_eSPI.cpp, and TFT_eSPI.h
Smooth fonts can now be rendered direct to the TFT with very little flicker for quickly changing values. This is achieved by a line-by-line and block-by-block update of the glyph area without drawing pixels twice. This is a "breaking" change for some sketches because a new true/false parameter is needed to render the background. The default is false if the parameter is missing, Examples:tft.setTextColor(TFT_WHITE, TFT_BLUE, true); spr.setTextColor(TFT_BLUE, TFT_BLACK, true);
red_car: Thank you for getting back to me with your proposed change to the TFT_eSPI.cpp file in order to solve the setTextColor problem. I have tried making the changes to the TFT_eSPI.cpp file as you suggested in your posting back to me. My implementations of your suggestion did not work.
I enclose in the two Word Documents:
Portions of code from the TFT_eSPI.cpp file referenced by line number in the Error Messages;
and,
My attempts to implement your solution suggestions to the the TFT_eSPI.cpp
Would you please show me how to implement these suggested changes to the TFT_eSPI.cpp fiie?
You also referenced the documentation file related to the solution of this problem. Would you please direct me to the link associated with this documentation?
red_car: Thank you once more for time working with me. This is clearly a (possibly combined) problem related to the IDE version in use, plus the TFT_eSPI library in use.
Question: When you told me that your version of this sketch compiles, were you able to place text and draw a red box on your ILI9341 Display?
What IDE Release are you using? I am using 1.8.12
What TFT_eSPI Release are you using? I am using TFT_eSPI Release 2.3.70.
Hey @grenken ... just a note... when responding and you want to tag someone in make sure you put a @ before the user... otherwise they won't be alerted that you have responded (I just happened to stumble across this again).
@sterretje : That did it. I changed to TFT_eSPI 2.4.61 and the application worked just fine. I'm not sure how I messed this one up, but I certainly thank you for your help.
Best wishes.
I think the honours go to @red_car. You can click the "solution" button under his/her last post so others who encounter the same problem know that a solution is provided.
@red_car: That did it. I changed to TFT_eSPI 2.4.61 and the application worked just fine. I'm not sure how I messed this one up, but I certainly thank you for your help.
Best wishes.