mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-19 01:06:41 +00:00
add lovyangfx custom offset for tft
This commit is contained in:
parent
9a3e9c03b8
commit
7ced77a7a9
@ -113,6 +113,12 @@
|
||||
#ifndef SPI_READ_FREQUENCY
|
||||
#define SPI_READ_FREQUENCY 0
|
||||
#endif
|
||||
#ifndef TFT_OFFSET_X
|
||||
#define TFT_OFFSET_X 0
|
||||
#endif
|
||||
#ifndef TFT_OFFSET_Y
|
||||
#define TFT_OFFSET_Y 0
|
||||
#endif
|
||||
#ifndef TFT_OFFSET_ROTATION
|
||||
#define TFT_OFFSET_ROTATION 0
|
||||
#endif
|
||||
|
@ -204,8 +204,8 @@ static void configure_panel(lgfx::Panel_Device* panel, Preferences* prefs)
|
||||
cfg.memory_width = prefs->getUInt("memory_width", cfg.panel_width); // Maximum width supported by driver IC
|
||||
cfg.memory_height = prefs->getUInt("memory_height", cfg.panel_height); // Maximum height supported by driver IC
|
||||
|
||||
cfg.offset_x = prefs->getUInt("offset_x", 0); // Amount of offset in the X direction of the panel
|
||||
cfg.offset_y = prefs->getUInt("offset_y", 0); // Amount of offset in the Y direction of the panel
|
||||
cfg.offset_x = prefs->getUInt("offset_x", TFT_OFFSET_X); // Amount of offset in the X direction of the panel
|
||||
cfg.offset_y = prefs->getUInt("offset_y", TFT_OFFSET_Y); // Amount of offset in the Y direction of the panel
|
||||
cfg.offset_rotation =
|
||||
prefs->getUInt("offset_rotation", TFT_OFFSET_ROTATION); // Offset of the rotation 0 ~ 7 (4 ~ 7 is upside down)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user