1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-08-18 10:22:31 +02:00

Add 4 inch TFT display ST7796

This commit is contained in:
Norbert Walter
2026-02-27 21:33:23 +00:00
parent 065a9807d2
commit aea401589d
36 changed files with 272 additions and 85 deletions
+8 -2
View File
@@ -28,8 +28,14 @@ Chart::Chart(RingBuffer<uint16_t>& dataBuf, double dfltRng, CommonData& common,
fgColor = commonData->fgcolor;
bgColor = commonData->bgcolor;
dWidth = getdisplay().width();
dHeight = getdisplay().height();
// display dimensions (avoid calling width()/height() on incomplete LGFX type)
#ifdef DISPLAY_ST7796
dWidth = 480;
dHeight = 320;
#else
dWidth = getdisplay().width();
dHeight = getdisplay().height();
#endif
dataBuf.getMetaData(dbName, dbFormat);
dbMIN_VAL = dataBuf.getMinVal();