Skip to content

LVGL 5.3: lcd::print() is broken #25

Open

Description

@Richard-Stump

Task:

The lcd::print function for llemu.cpp/hpp is not printing anything. An example of this can be seen with the default main.cpp:

...
while (true) {
        pros::lcd::print(0, "%d %d %d", (pros::lcd::read_buttons() & LCD_BTN_LEFT) >> 2,
		               (pros::lcd::read_buttons() & LCD_BTN_CENTER) >> 1,
		               (pros::lcd::read_buttons() & LCD_BTN_RIGHT) >> 0);
...

This should print the states of the 3 buttons as 0 or 1 on the first line, but currently seems to print nothing. It should look like:
image

Beta Server Link:

https://discordapp.com/channels/1025259843763847229/1029666535553384498/1071536722996887602

Testing:

This can be tested using the default main.cpp. The button states should be printed at the top, and change when the buttons are pressed.

Activity

  1. WillXuCodes commented on Feb 25, 2023

    @WillXuCodes
    Member

    Def something to do with the weak symbol not being overidden. Probably because it's one of the functions inside screen.hpp

  2. WillXuCodes commented on Mar 13, 2023

    @WillXuCodes
    Member

    This is going to be the order of troubleshooting for some poor soul that actually has time to do this:

    1. Add some sort of print statement or feedback to the lcd::print statement on the Kernel side.
    2. Turn Kernel into template, apply it to a default project, y'all know the drill w/ that.
    3. Apply current version of liblvgl to that.
      4a. See if feedback occurs. If feedback does occur, we need to figure out how to create a templated function that is also considered with attribute weak.
      4b. While my initial google search did not yield anything of substance, attempting to RTFM more or moving the "attribute(weak)" before the template part might work? We might also want to consider dynamically figuring out if the print func is initialized and calling some new "dummy" printv weak function that uses a variadic argument parameter instead of the argument list which may allow us to bypass using a template.
  3. Richard-Stump commented on Mar 23, 2023

    @Richard-Stump
    ContributorAuthor

    Update: The weak symbol works as intended, and the api.h file in the kernel simply does not include the llemu headers, since they were pulled out of the kernel repo.

  4. Richard-Stump commented on Mar 23, 2023

    @Richard-Stump
    ContributorAuthor

    We need to somehow make it so that they are included in API.h, only when liblvgl is applied to the project. I am currently trying to figure out the best way to go about this.

  5. WillXuCodes commented on Apr 5, 2023

    @WillXuCodes
    Member

    Update: This is now only a liblvgl 5.3 (legacy) issue. Would be nice to solve ASAP but higher priority tasks such as doxygen and Okapi should be finished first before working on this backwards compatibility version working.

  6. changed the title [-]PROS 4: lcd::print() is broken[/-] [+]LVGL 5.3: lcd::print() is broken[/+] on Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions