๐[BUG] - Inconsistencies in some llemu functions requiring liblvgl while others don't
ssejrog opened this issue ยท 2 comments
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:
- Create a new project
- In
initialize()
, replacepros::lcd::register_btn1_cb(on_center_button);
withbtn0
orbtn2
. - Build the project. You will get
error: 'register_btn2_cb' is not a member of 'pros::lcd'
- Apply
liblvgl@8.3.8
- Build the project and everything works as normal
- Make a template that uses
btn0
orbtn2
- 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()
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.
thanks for this thread I just figure out why the screen black and lcd initial failed.
Just pros c apply liblvgl