Adafruit_GFX setRotation not working when called from within a class
I would actually be quite surprised if outsideClassRotation() actually
worked. My guess is that it does not work as is. Maybe it did work at
some point, but then you made some subtle changes to your code and did
not check that it is still working.

Here is the deal: there are two setRotation() methods:


Adafruit_GFX::setRotation(unsigned char) does very little besides
storing the rotation angle... which is not used anyway.
Adafruit_ILI9341::setRotation(unsigned char) actually sends commands
to the LCD asking it to apply the rotation; this is the method you
want.


The problem is that these methods are not virtual, which means that
when you call them through a pointer, as in
some_pointer-&gt;setRotation(the_angle);, you get the method
corresponding to the type of the pointer, not the type of the actual
object. For example:

tft-&gt;setRotation(the_angle);     // calls Adafruit_ILI9341::setRotation()
ptrTft-&gt;setRotation(the_angle);  // calls Adafruit_GFX::setRotation()
passed-&gt;setRotation(the_angle);  // calls Adafruit_GFX::setRotation()


I checked this by uncommenting your call to outsideClassRotation() and
disassembling the compiled binary: both times you are calling
Adafruit_GFX::setRotation().

Solution: change your Adafruit_GFX * pointers to be of
type Adafruit_ILI9341 *, or patch Adafruit_GFX.h to make
setRotation() virtual.