Impressive library! Minor (solved) bug: While testing the example "Draw_SDcard_Bitmap.ino" on Arduino MEGA for a TFT-3.5" display, 480x320 size, 16-bit (model MAR3513) parallel interface, driver ILI9486 (marked on the module) and set as such in User_Setup.h, the following issue occurred, for any rotation 0...3 (SdFat library was used) :
-The BMB files are Left-Right flipped and writing text on a blank page with the same orientation gives inverted text.
I modified TFT_HX8357.cpp and now all works fine:
/ Function name: setRotation
Description: rotate the screen orientation m = 0-3 or 4-7 for BMP drawing
/
define MADCTL_MY 0x80
define MADCTL_MX 0x40
define MADCTL_MV 0x20
define MADCTL_ML 0x10
define MADCTL_RGB 0x00
define MADCTL_BGR 0x08
define MADCTL_SS 0x02
define MADCTL_GS 0x01
ifdef ILI9481
void TFT_HX8357::setRotation(uint8_t m)
{
writecommand(HX8357_MADCTL);
rotation = m % 4;
switch (rotation) {
case 0: // Portrait
Impressive library! Minor (solved) bug: While testing the example "Draw_SDcard_Bitmap.ino" on Arduino MEGA for a TFT-3.5" display, 480x320 size, 16-bit (model MAR3513) parallel interface, driver ILI9486 (marked on the module) and set as such in User_Setup.h, the following issue occurred, for any rotation 0...3 (SdFat library was used) : -The BMB files are Left-Right flipped and writing text on a blank page with the same orientation gives inverted text. I modified TFT_HX8357.cpp and now all works fine:
/ Function name: setRotation Description: rotate the screen orientation m = 0-3 or 4-7 for BMP drawing /
define MADCTL_MY 0x80
define MADCTL_MX 0x40
define MADCTL_MV 0x20
define MADCTL_ML 0x10
define MADCTL_RGB 0x00
define MADCTL_BGR 0x08
define MADCTL_SS 0x02
define MADCTL_GS 0x01
ifdef ILI9481
void TFT_HX8357::setRotation(uint8_t m) { writecommand(HX8357_MADCTL); rotation = m % 4; switch (rotation) { case 0: // Portrait
ifdef ILI9486 // MADCTL [MY, MX, MV, ML, BGR, MH, xx, xx]
else
endif
case 1: // Landscape (Portrait + 90)
ifdef ILI9486
else
endif
case 2: // Inverter portrait
ifdef ILI9486
else
endif
case 3: // Inverted landscape
ifdef ILI9486
else
endif
} }