meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.63k stars 909 forks source link

[Feature Request]: T190 Artifacts on Lovyangfx #5211

Open sim1988son opened 3 weeks ago

sim1988son commented 3 weeks ago

Platform

ESP32

Description

Managed to launch heltec T190 on Lovyangfx. And on an empty program it's ok (the program is on my https://github.com/sim1988son/HELTEC-VISION-MASTER-T190-LovyanGFX-.git) and the image is ok, but when I implement the software to meshtastic, I have artifacts at the bottom of the screen. https://www.facebook.com/share/p/181M53Agvn/

sim1988son commented 3 weeks ago

Hello , we managed to correct the artifacts but there is a need to integrate in the OLEDDisplay.h and OLEDDisplay.cpp files in https://github.com/meshtastic/esp8266-oled-ssd1306.git#e16cee124fe26490cb14880c679321ad8ac89c95 ; ESP8266_SSD1306

OLEDDisplay.cpp

uint16_t OLEDDisplay::getHeight(void) {

ifdef HELTEC_VISION_MASTER_T190

return displayHeight-6;

else

return displayHeight;

endif

}

OLEDDisplay.h

ifdef HELTEC_VISION_MASTER_T190

uint16_t height(void) const { return displayHeight-6; };

else

uint16_t height(void) const { return displayHeight; };

endif

The problem is the height of HELTEC_VISION_MASTER_T190, which is 170 and is not divisible into 8, so the height has to be made divisible #define TFT_WIDTH 176 , and then cheated in the files above by these 6 pixels.

I can say that LovyanGFX works on Healtec T190.

Greetings to all.

IMG20241102173931

sim1988son commented 3 weeks ago

variant.h

// ST7789 TFT LCD

define ST7789_CS 39

define ST7789_RS 47 // DC

define ST7789_SDA 48 // MOSI

define ST7789_SCK 38

define ST7789_RESET 40

define ST7789_MISO 4

define ST7789_BUSY -1

define ST7789_BL 17

define ST7789_SPI_HOST SPI3_HOST

define TFT_BL 17

define SPI_FREQUENCY 40000000

define SPI_READ_FREQUENCY 16000000

define TFT_HEIGHT 320

define TFT_WIDTH 176

define TFT_OFFSET_X 35

define TFT_OFFSET_Y 0

define TFT_OFFSET_ROTATION 1 //=====

edit TFTDisplay.cpp ->

elif defined(ST7789_CS)

. . .

ifdef HELTEC_VISION_MASTER_T190

        cfg.pin_rst = ST7789_RESET; 

else

        cfg.pin_rst = -1;       // Pin number where RST is connected  (-1 = disable)

endif