Skip to content
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

TFT_eSPI User_Setup.h is not included as advised in the TFT_eSPI documentation #16

Open
hornetfighter515 opened this issue Feb 21, 2024 · 0 comments

Comments

@hornetfighter515
Copy link
Contributor

https://github.com/Bodmer/TFT_eSPI?tab=readme-ov-file#tips says that we should have the file in a separate directory and import it.

Tips

If you load a new copy of TFT_eSPI then it will overwrite your setups if they are kept within the TFT_eSPI folder. One way around this is to create a new folder in your Arduino library folder called "TFT_eSPI_Setups". You then place your custom setup.h files in there. After an upgrade simply edit the User_Setup_Select.h file to point to your custom setup file e.g.:

#include <../TFT_eSPI_Setups/my_custom_setup.h>

You must make sure only one setup file is called. In the custom setup file I add the file path as a commented out first line that can be cut and pasted back into the upgraded User_Setup_Select.h file. The ../ at the start of the path means go up one directory level. Clearly you could use different file paths or directory names as long as it does not clash with another library or folder name.

You can take this one step further and have your own setup select file and then you only need to replace the Setup.h line reference in User_Setup_Select.h to, for example:

#include <../TFT_eSPI_Setups/my_setup_select.h>

To select a new setup you then edit your own my_setup_select.h file (which will not get overwritten during an upgrade).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant