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

lvgl can not use OO style api on widgets #5980

Open
offer-shmuely opened this issue Mar 9, 2025 · 1 comment
Open

lvgl can not use OO style api on widgets #5980

offer-shmuely opened this issue Mar 9, 2025 · 1 comment
Labels
bug 🪲 Something isn't working triage Bug report awaiting review / sorting

Comments

@offer-shmuely
Copy link
Contributor

offer-shmuely commented Mar 9, 2025

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

the following code is working in one-time script, but fail in widgets

    lvgl.clear();

    local box = lvgl.box({x=100, y=10})
    box:rectangle({x=0, y=0, w=100, h=100, color=YELLOW, filled=false, rounded=8, thickness=4})
    box:rectangle({x=10, y=10, w=100, h=100, color=YELLOW, filled=false, rounded=8, thickness=4})

Image

Expected Behavior

I expect the we can use OO style on widgets as weel

box:rectangle()

Steps To Reproduce

use this widget

local app_name="t_lvglCtx4"

local options={}
local function create(zone, options)
    local wgt={zone=zone, options=options}
    return wgt
end

local function update(wgt, options)
    wgt.options=options
    lvgl.clear();
    local box = lvgl.box({x=100, y=100})
    box:rectangle({x=0, y=0, w=100, h=100, color=ORANGE, filled=false, rounded=8, thickness=4})
end

local function background(wgt)
end

local function refresh(wgt)
end

return {name=app_name,create=create,options=options,update=update,refresh=refresh,background=background,useLvgl=true}

Version

2.11.0-rc

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

Windows

OS Version

win11

Anything else?

No response

@offer-shmuely offer-shmuely added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Mar 9, 2025
@philmoz
Copy link
Collaborator

philmoz commented Mar 10, 2025

Fixed in #5926

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

No branches or pull requests

2 participants