Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG] - Inconsistencies in some llemu functions requiring liblvgl while others don't #673

Open
ssejrog opened this issue Jun 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ssejrog
Copy link
Contributor

ssejrog commented Jun 3, 2024

Describe the bug

Some (seemingly) missing llemu functions throw errors without liblvgl 8.3.8, while other functions don't seem to require it.

To Reproduce

Steps to reproduce the behavior on a fresh project:

  1. Create a new project
  2. In initialize(), replace pros::lcd::register_btn1_cb(on_center_button); with btn0 or btn2.
  3. Build the project. You will get error: 'register_btn2_cb' is not a member of 'pros::lcd'
  4. Apply [email protected]
  5. Build the project and everything works as normal
  6. Make a template that uses btn0 or btn2
  7. Applying this to a project without liblvgl will throw errors. Applying this to a project with liblvgl will work.

This can be recreated in release/3.1.0 of EZ-Template. The base project has liblvgl installed and EZ-Template-Example-Project does not. Removing liblvgl from the main project throws errors, adding liblvgl to the example project fixes the errors.

Versions of stuff

  • Windows
  • okapilib 5.0.0
  • liblvgl 8.3.8
  • EZ-Template 3.1.0
  • kernel 4.1.0

Additional Information

These are the functions I see this is happening with, and all aren't in llemu.hpp. There could be more, and this could be related to purduesigbots/liblvgl#44?

  • clear()
  • shutdown()
  • register_btn0_cb()
  • register_btn2_cb()
@ssejrog ssejrog added the bug Something isn't working label Jun 3, 2024
@WillXuCodes
Copy link
Member

So this issue is multifaceted:

On the kernel side of this that could be an enhancement:

  • This is a side effect of us declaring main.cpp LLEMU calls as weak symbols so it compiles without liblvgl installed.
  • Maybe we should just declare all LLEMU calls as weak symbols so user code can be agnostic to if LVGL is installed or not in reference to LLEMU?

The actual bug part of this:

  • liblvgl is not being installed by default by the CLI. This is a major issue as lvgl is an integral part of using the screen with PROS.

@hpyhacking
Copy link

thanks for this thread I just figure out why the screen black and lcd initial failed.

Just pros c apply liblvgl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants