Skip to content

LVGL line does not draw correctly #6350

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

Closed
1 task done
wimalopaan opened this issue Jun 8, 2025 · 1 comment · May be fixed by #6351
Closed
1 task done

LVGL line does not draw correctly #6350

wimalopaan opened this issue Jun 8, 2025 · 1 comment · May be fixed by #6351
Labels
bug 🪲 Something isn't working triage Bug report awaiting review / sorting

Comments

@wimalopaan
Copy link
Contributor

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

I encounter a very strange problem drawing a simple line:

    local w = LCD_W;
    local h = LCD_H - 60;
    local cx = w / 2;
    local cy = h / 2 + 30;
    local r_circle = h / 2;
    page:circle({x = cx, y = cy, radius = r_circle });
    page:label({x = 5, y = 5, text = (function() return "V: " .. getValue(widget.options.Src); end)});
    page:line({thickness = 1, color = CYAN, pts = (function()
                local v = getValue(widget.options.Src) * math.pi / 1024;
                local x = r_circle * math.cos(v) + cx;
                local y = r_circle * math.sin(v) + cy;
                return { { cx, cy }, { x, y } };
            end)});

This should draw a circle with a rotating line inside that circle. This fully works in simulator but on radio (x12s) it draw the line only in the second quadrant (of the imaginary coordinate system with origin at the center of the circle). I have complexer examples where only quadrant 1 and 2 are correct. Looks very strange to me. Lines with fixed coordinates work well. Looks this has something to do with the function returning the points table.
On TX16s the line does not rotate at all, it remains at a random position when taking the widget to full-screen

Expected Behavior

The line rotates / draws correctly

Steps To Reproduce

Use the above example

Version

2.11.1

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

Linux

OS Version

Arch Linux

Anything else?

No response

@wimalopaan wimalopaan added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Jun 8, 2025
@wimalopaan
Copy link
Contributor Author

Fixed by #6351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working triage Bug report awaiting review / sorting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant