🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    uiflow Lcd.print function issue or feature ?

    Bug Report
    4
    6
    9.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      robalstona
      last edited by

      Hello, I noticed the difference in how the lcd.print function works on older versions and the new uiflow version. On 1.4.2, 1.4.5 (on these I checked) the function displays on the screen text in a given color with a black background. Whereas in version 1.5.3 the same function displays the text in a given color with a transparent background.

      Both solutions have their pros and cons.

      Is there any option or additional parameter to set the background color of the text instead of transparent in the Lcd.print function.

      I often use such a trick (to avoid screen flickering) that instead of cleaning the entire screen, I simply display the new text in the same place as the previous and old text was "covered" with the new one, while in version 1.5.3 you can see all previous overlapping self lyrics.

      And here is the problem, because wanting to upload such a program previously written on version 1.4.5 on the firmware version 1.5.3 practically to be changed again the whole concept and code displaying content

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        1.5+ moved to mainstream Micropython. you should check out the official micropython website for api assistance.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • lukasmaximusL
          lukasmaximus
          last edited by

          Interesting find @robalstona I'll have to look into this one. Uiflow changing to mainstream micropython shouldn't have changed much though since as far as I know the lcd module is still based off of loboris's work, I do seem to remember there being a parameter for setting background color, have you tried entering an extra hex value after you set the text color?

          1 Reply Last reply Reply Quote 0
          • R
            robalstona
            last edited by robalstona

            @lukasmaximus I know I can enter additional parameters but for this I have to use either the python tab or the "execute" block. As a last resort I'll make a custom block.

            The problem is rather that the same function with the same parameters from version to version changes the result of its operation.

            I suspect that this was a conscious procedure in connection with a change in the graphic design of uiflow 1.5.4 firmware where the inscriptions overlap the graphics in the start menu.

            I would care more about changing or expanding with additional parameters one of the built-in block or maybe create new built-in block.

            W 1 Reply Last reply Reply Quote 0
            • W
              wingtiger @robalstona
              last edited by

              @robalstona
              So there are two issues here, transparency and background color for lcd.print block.

              I solved the transparency issue by placing an execute block with "lcd.font(lcd.FONT_DejaVu24, transparent=False)"
              before calling print block. This is handy since you only need one execute block. Font size doesn't matter.
              But this is not a good solution at all especially for young developers.

              For background compatibility, the behavior of the transparency of lcd.print must be the same as the older versions.

              @lukasmaximus, could you consider fixing this on the next beta?
              If this is a specificaiton, then uiflow needs to have some other blocks to setup the transparency for text drawings.

              In addition, it is good to have a means of specifying a background color for lcd.print.

              wingtiger

              Environment: Windows10 (Ryzen 7 2700X) + UiFlow Beta / arduino

              1 Reply Last reply Reply Quote 0
              • R
                robalstona
                last edited by

                @wingtiger Thanks for the info with this font loading command. The problem is that to upgrade to the new firmware version I have to change most of my programs.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post