Giter VIP home page Giter VIP logo

Comments (15)

IanSC avatar IanSC commented on August 18, 2024 1

Tried LVGL examples with the changes and it works.
Except for slight flickers...

Thanks to @rzeldent !

So guys, let's support or buy this guy a beer, without his efforts these boards will be
useless or extremely difficult to use. Looking at you Sunton.

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

Hi Andre,

Looks like the LV_COLOR16_SWAP is incorrect.

from esp32-smartdisplay.

Andre-Schuiki avatar Andre-Schuiki commented on August 18, 2024

Yeah that's what i thought too but i already tried with swap enabled and get the same result.

I will try it again tomorrow and give you feedback.

Thanks for your help!

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

It can be that you need to rebuild the library. The define is only taken into account when compiling thew library (that is cached).
Retry it but delete the .pio directory first. It is also possible that you need to change the settings in Squareline to be able to compile...
This should have been solved in the 2.0.x versions?!

from esp32-smartdisplay.

Andre-Schuiki avatar Andre-Schuiki commented on August 18, 2024

It can be that you need to rebuild the library. The define is only taken into account when compiling thew library (that is cached). Retry it but delete the .pio directory first. It is also possible that you need to change the settings in Squareline to be able to compile... This should have been solved in the 2.0.x versions?!

Ok i have tried with LV_COLOR_16_SWAP 1 but i get the same result. (i also have deleted the .pio folder before compiling)

from esp32-smartdisplay.

IanSC avatar IanSC commented on August 18, 2024

I have the same issue as this. Edited lv_conf.h and changed

#define LV_COLOR_16_SWAP 0

Did a PIO: Clean by clicking the trash can before uploading. Got the correct photo color,
but text are garbled and the colors for widgets are off.
eg. green border, greenish background, avocado button

esp32-8048S070C




Tried it on another device and it appears correct (set the swap var to 1 since SPI).

esp32-3248S035C




Not sure if related, but the downloaded library does not contain ST7701 files.

Thanks for the help and the great library!

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

Hi IanSC,

Maybe the 16 bits color array is swapped, that's what I suspect. You can try to swap it by manually by setting in lvgl_rgb_panel.c the color 16 swap, just for testing:

// Create direct_io panel handle
#if LV_COLOR_16_SWAP != 0

Ordered the 8048S070C and will hopefully be able to reproduce it and correct it.

from esp32-smartdisplay.

IanSC avatar IanSC commented on August 18, 2024

Hi rzeldent,

A: lv_conf.h #define LV_COLOR_16_SWAP <value>
B: lvgl_rgb_panel.c, line 28 #if LV_COLOR_16_SWAP <operator> 0

A < value > B < operator > Image Text Colors
1 != inverted garbled off
0 != okay garbled off
1 == inverted garbled off
0 == okay garbled off

Thanks for checking this out.

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

Hi LanC,

Thanks for testing this. I was hoping it was just a typo... So basically the text is always garbled....
Have you tried inverting the image? esp_lcd_panel_invert_color(handle, true);

Hopefully will receive the board this week!

from esp32-smartdisplay.

IanSC avatar IanSC commented on August 18, 2024

Hi rzeldent,

Took me a while to figure out where to the add the line of code.

I also tried the other cases from your previous suggestion.
I doubted there would be any difference since it's a text issue not color,
but surprisingly it got much better.

Thanks again!

in lvgl_rgb_panel.c, added:
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
      at the end of the function lvgl_lcd_init()

A: lv_conf.h #define LV_COLOR_16_SWAP <value>
B: lvgl_rgb_panel.c, line 28 #if LV_COLOR_16_SWAP <operator> 0

CASE A < value > B < operator > Image Text Colors Shade Note
1 1 == inverted garbled off none
2 0 == wrong garbled off purple
3 1 != wrong okay off dark purple
4 0 != inverted okay okay none FPS overlay seems off

CASE 1

CASE 2

CASE 3

CASE 4

from esp32-smartdisplay.

IanSC avatar IanSC commented on August 18, 2024

Additional Test:
Just reporting here to help solve any potential issues.
I don't remember the colors being so far off with the built in app
that came with the device.

TIP:
Don't use the included cable!
USB-C to USB-C does not work for me.
Use C to A, A to C cable. (Port is old USB in C form factor.)

These are not bug reports, just observations.
Big screen is yellowish and less brighter.
Added:

void setup() {
    ...
    smartdisplay_init();
    // smartdisplay_lcd_set_backlight(1.0f); // screen flickers
    // smartdisplay_lcd_set_backlight(0.9f); // screen flickers
    smartdisplay_lcd_set_backlight(0.5f);    // screen flickers
    ...
    tutorialCode();
}
void loop() {
    lv_timer_handler();
}

Changing the brightness causes the screen to flicker and become unstable, even if set to 0.5f
which is the same inside smartdisplay_init(). I might be calling it in the wrong place.

Button test seems normal, except for overlay.
Solid RGB colors are off.

IMG_20240108_213810
IMG_20240108_222219
IMG_20240108_222239
IMG_20240108_222254

from esp32-smartdisplay.

IanSC avatar IanSC commented on August 18, 2024

Hi rzeldent,

Based on:
Esp32-8048S070 display, different version
#90

I tried the settings for v1.3 and the text and colors are correct.

For noobs like me:

  • make a copy of esp32-8048S070C.json inside board folder
  • rename as, say esp32-8048S070C-v1.3.json
  • edit and apply suggested changes in Issue #90
  • edit platformio.ini and use board = esp32-8048S070C-v1.3
  • rebuild

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

Thanks!

BTW in the develop the v1.3 board will be the default. Think the v1.1 was some typo.

from esp32-smartdisplay.

MrOptifine avatar MrOptifine commented on August 18, 2024

Any idea on how to fix the screen flickers?

from esp32-smartdisplay.

rzeldent avatar rzeldent commented on August 18, 2024

Hi Optifine,

I think the PCLK needs tweaking....

from esp32-smartdisplay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.