Closed garthvh closed 10 months ago
The issue appears in 2.2.17 where the following changes were made in Screen.h:
While it looks nice and clean to use the baseclass pointer it unfortunately does not work anymore, because the OLEDDisplay baseclass is poorly designed as it does not use virtual function declarations (especially in this case flipScreenVertically()
). That means now OLEDDisplay::flipScreenVertically()
is called instead of TFTDisplay::flipScreenVertically()
.
There are three possible solutions to fix this: (1) revert this change (but use pointers as required now in this commit) (2) Change the library OLEDDisplay to use virtual function declarations (e.g. fork into meshtastic repository) (3) Use this ugly "hack" in Screen.cpp#1055 (and maybe at other yet undetected broken places)
#if defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(RAK14014)
static_cast<TFTDisplay *>(dispdev)->flipScreenVertically();
#endif
@jp-bennett
Category
Hardware Compatibility
Hardware
T-Watch
Firmware Version
2.2.18
Description
I need to flip my twatch screen and the flip screen vertically config option is not doing anything.
Relevant log output
No response