Skip to content

Dynamically Change Orientation? #931

Answered by Bodmer
lbussy asked this question in Q&A - General
Discussion options

You must be logged in to vote

The library class for the TFT has no destructor and thus can not be "ended". The rationale was that if a TFT is connected then the instance can be global as it is unlikely the dislay will only be used once. The memory footprint is quite low compared to the RTOS etc on an ESP32 so I have never seen the need to end the library instance.

You can change the rotation at any time, (example) you do not need to stop and start with a new instance. The display can be re-initialised by calling tft.begin() again as there is a boot lock that only runs part of the initiailisation the second time it is called. This permits the display to be powered down and restarted later.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Bodmer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants