MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.25k stars 19.23k forks source link

[FR] WIP: MKS UI/TFT_LVGL_UI Updates & Fixes #18476

Closed thisiskeithb closed 4 years ago

thisiskeithb commented 4 years ago

Bug Description

This is a continuation of discussion from PR https://github.com/MarlinFirmware/Marlin/pull/18438. Several issues still exist:

To-do

Complete

My Configurations

This is a general issue with MKS's LVGL implementation, so it applies to all configs with TFT_LVGL_UI_FSMC/TFT_LVGL_UI_SPI enabled.

makerbase-mks commented 4 years ago

@rhapsodyv @thisiskeithb The bugfix-2.0.x version submitted by rhapsodyv has been tested and found that Chinese and Russian languages can be displayed. Due to the problem of address offset, the display is not complete enough. I need to change it.

The following picture shows the problem that occurred after I updated the latest font. I need to modify the font offset in the code to solve this problem. https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/tree/master/Firmware/mks_font image

The interface shown in the following picture is the normal interface displayed after I updated the old version of the font https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/tree/v2.0.5.3/Firmware/mks_font image

thisiskeithb commented 4 years ago

The bugfix-2.0.x version submitted by rhapsodyv has been tested and found that Chinese and Russian languages can be displayed. Due to the problem of address offset, the display is not complete enough. I need to change it.

Sounds like a simple fix. There's still an issue with some special characters not being displayed.

In your photos above, "franais" should be "français": https://github.com/MarlinFirmware/Marlin/blob/e5bc9d31cc87be5c7ef2bd3cd70c2599f76d2bd7/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h#L535

and "espaol" should be "español": https://github.com/MarlinFirmware/Marlin/blob/e5bc9d31cc87be5c7ef2bd3cd70c2599f76d2bd7/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h#L541

@rhapsodyv was able to update to LVGL 7.0 without modifying your fork. but I don't think they've tested special characters yet.

ftoz1 commented 4 years ago

Seem to me wrong way add lvlg issues to many files as y present. There should be one lvlg starter file instead of ultralcd.cpp which inicialize gui.

thisiskeithb commented 4 years ago

Seem to me wrong way add lvlg issues to many files as y present. There should be one lvlg starter file instead of ultralcd.cpp which inicialize gui.

Can you clarify what this means?

This is a beta feature that is a work in progress. Expect frequent updates as this feature is updated and expanded to more hardware.

ftoz1 commented 4 years ago

Its not depend if beta of what stage it is, but all lcd issues should be only in /lcd dir. And marlin.cpp should call init gui and update gui. There cant be gui issues across all marlin files. It sucks me as hell on marlin. The reason is simple if y want to use another ui/gui, y get big stop by many ui issues in gcodes and in hundred files. I am now refresh work on it and seems to share some experimental working version till week. But i am always trouble with basic things on marlin. Dual Z motor not work on latest versions, so always need to solve basic things.

thisiskeithb commented 4 years ago

@ftoz1: It sounds like you have a misunderstanding of how Marlin is organized and configured and those are not related to LVGL/this issue.

For best results getting help with configuration and troubleshooting, please use the following resources:

ftoz1 commented 4 years ago

good luck. https://www.youtube.com/watch?v=3coW24_y9d8&feature=youtu.be

rhapsodyv commented 4 years ago

@rhapsodyv @thisiskeithb The bugfix-2.0.x version submitted by rhapsodyv has been tested and found that Chinese and Russian languages can be displayed. Due to the problem of address offset, the display is not complete enough. I need to change it.

The following picture shows the problem that occurred after I updated the latest font. I need to modify the font offset in the code to solve this problem.

@makerbase-mks

Did you fixed the offset? What’s to commit to my branch?

rhapsodyv commented 4 years ago

good luck. https://www.youtube.com/watch?v=3coW24_y9d8&feature=youtu.be

All the lvgl code is isolated in lcd folder. There’re only two from Marlin core: init and update loop.

ftoz1 commented 4 years ago

I am saying that, because original marlin cause many troubles by that. There are a lot of ui issues everywhere and i am stuck on it. If want keep marlin with open mind changeable ui, its good to keep file structure.

GMagician commented 4 years ago

@thisiskeithb and Italian is "Italiano" not "Italia" :-)

thisiskeithb commented 4 years ago

@thisiskeithb and Italian is "Italiano" not "Italia" :-)

I didn’t write the translations. I’m just pointing out the missing characters.

GMagician commented 4 years ago

@thisiskeithb you may think about a new job :-D

thisiskeithb commented 4 years ago

@thisiskeithb you may think about a new job :-D

What do you mean by that?

GMagician commented 4 years ago

It was a joke, you may think to start to be a translator, no offense

thisiskeithb commented 4 years ago

Marlin is accepting pull requests, so feel free to correct translation errors.

makerbase-mks commented 4 years ago

@thisiskeithb Thank you for your suggestion,I have submitted my changes. I merged @rhapsodyv 's code, the test found that it worked very well. The following content is my submission link https://github.com/MarlinFirmware/Marlin/pull/18500

I haven't updated the graphics library to 7.0 yet, I think I will cooperate with @rhapsodyv to do this job well. The following are my tests on robin_nano_v1.2 and V2.0 after the merger image image

ftoz1 commented 4 years ago

How fast is approx draw page on nano with that?

rhapsodyv commented 4 years ago

I think we can update the progress

thisiskeithb commented 4 years ago

@makerbase-mks Is updating to LVGL 7.x still planned? They are up to version 7.6 now.

ellensp commented 4 years ago

several parts of the code for MKS_UI code calls "card." without checking sdsupport is actually enabled egs mks_ui/draw_print_file.cpp:549:3: error: 'card' was not declared in this scope mks_ui/printer_operation.cpp:237:5: error: 'card' was not declared in this scope

rhapsodyv commented 4 years ago

several parts of the code for MKS_UI code calls "card." without checking sdsupport is actually enabled egs mks_ui/draw_print_file.cpp:549:3: error: 'card' was not declared in this scope mks_ui/printer_operation.cpp:237:5: error: 'card' was not declared in this scope

LVGL ui will not work without SDSUPPORT because it needs to loads the assets.

Maybe we should put a sanity check to remember the user to enable it.

ellensp commented 4 years ago

makes sense, but then the blocks of code like "#if ENABLED(SDSUPPORT)" don't....

rhapsodyv commented 4 years ago

makes sense, but then the blocks of code like "#if ENABLED(SDSUPPORT)" don't....

Sure... those blocks don't make sense... at least now.

Maybe in the future, when we have a light version of the lvgl, without assets loading

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.