edgetx
edgetx copied to clipboard
lvgl can not use OO style api on widgets
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})
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
Fixed in #5926
@pfeerick This issue has been fixed Can you close the issue?