Giter Site home page Giter Site logo

ToDos about luavgl HOT 10 OPEN

XuNeo avatar XuNeo commented on July 16, 2024
ToDos

from luavgl.

Comments (10)

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024 1

The protectedcall demo is designed to crash in 1second, it shows the ability to print call stack on screen.

However the flappyBird should not crash. I have adjusted the image path days ago, you may need to update the code and recompile again.

Thank you for your reply.I have solved the issue I was having. I am currently using Windows' QT5.14 simulation and I resolved the issue by making the following two modifications:

1-For LVGL's FS in QT, "LV_FS_WIN32_LETTER" and "LV_FS_WIN32_PATH" must be defined as the first letter of the user's home directory. This can be seen from the "lv_fs_get_drv" function where it performs a letter comparison. Since my home directory is "./examples", both paths must be set to ".".

2-In the "flappyBird.lua" example, the code "IMAGE_PATH = IMAGE PATH .. "/flappyBird/"" must be written as "IMAGE_PATH = IMAGE_PATH .. "flappyBird/"", otherwise an extra "/" symbol will be added to the "IMAGE PATH" concatenation.

from luavgl.

XuNeo avatar XuNeo commented on July 16, 2024 1

All the images in examples are png, change them to lvgl bin format and use indexed_8 will reduce memory significantly. Don't forget to update lua file with correct file extension name.

When hardfault occurs, try to get a backtrace or simply which piece of code causes it, so can do further analysis.

from luavgl.

XuNeo avatar XuNeo commented on July 16, 2024 1

For images that need transformation, use lvgl true_color_alpha format, do not use indexed_8 which is not supported.
Images include: the bird, the score result backgroud etc.

from luavgl.

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024

call_protectedcall lua_result

call_flappyBird lua_result

This is the error I encountered when executing protectedcall.lua and flappyBird.lua respectively. Is this a problem with my environment? I initially used Lua version 5.4.4.

from luavgl.

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024
call_protectedcall lua_result call_flappyBird lua_result

This is the error I encountered when executing protectedcall.lua and flappyBird.lua respectively. Is this a problem with my environment? I initially used Lua version 5.4.4.

Based on the analysis of the code in flappyBird.lua, it seems that the image file "pipe_up.png" has not been successfully opened or loaded. This can be seen from the fact that when printing the values up.h and up.w, they are both nil which indicates that the image dimensions have not been set.

from luavgl.

XuNeo avatar XuNeo commented on July 16, 2024

The protectedcall demo is designed to crash in 1second, it shows the ability to print call stack on screen.

However the flappyBird should not crash. I have adjusted the image path days ago, you may need to update the code and recompile again.

from luavgl.

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024

The current code is only suitable for embedded devices with large memory capacities. When running on a microcontroller with built-in SRAM of 128K and external SDRAM of 8M, loading the Flappy Bird demo image consumes a significant amount of memory. Do you have any suggestions regarding image processing? If we open the image using a C library and save the pointer to the opened image data, could we then pass the image pointer to the Lua virtual machine to reduce heap memory usage by Lua? I just started learning Lua last week and I have a limited understanding of it.

from luavgl.

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024

The current code is only suitable for embedded devices with large memory capacities. When running on a microcontroller with built-in SRAM of 128K and external SDRAM of 8M, loading the Flappy Bird demo image consumes a significant amount of memory. Do you have any suggestions regarding image processing? If we open the image using a C library and save the pointer to the opened image data, could we then pass the image pointer to the Lua virtual machine to reduce heap memory usage by Lua? I just started learning Lua last week and I have a limited understanding of it.

In order to make Lua run on my microcontroller, I made some modifications to the Lua system to adapt it, and I finally managed to run all the demo except for Flappy Bird. However, running Flappy Bird still leads to a HardFault.

from luavgl.

LinZeb906791229 avatar LinZeb906791229 commented on July 16, 2024

For images that need transformation, use lvgl true_color_alpha format, do not use indexed_8 which is not supported. Images include: the bird, the score result backgroud etc.

I am currently attempting to convert the image data to a bin file format utilizing the RGB555 TrueColor specification. I would like to express my gratitude once again for your assistance.

from luavgl.

jinsc123654 avatar jinsc123654 commented on July 16, 2024

You can try to modify this definition

VeryCapture_20240117160536

from luavgl.

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.