Replies: 15 comments 11 replies
-
Very good question |
Beta Was this translation helpful? Give feedback.
-
Happy to invest time,but not when not supported by a proper decision |
Beta Was this translation helpful? Give feedback.
-
I belive that all the widget should be LUA based. |
Beta Was this translation helpful? Give feedback.
-
If someone try to implement the current C++ widget, he will find some of the missing API like: we also miss the info of “outputs” channel |
Beta Was this translation helpful? Give feedback.
-
Big part of that is already fixed. But yes, first check all API needs. |
Beta Was this translation helpful? Give feedback.
-
I can work on the C++ part if someone starts the Widgets |
Beta Was this translation helpful? Give feedback.
-
I think the current set of baked-in widgets should stay, but no more added - the basics are covered. Any major improvements to them should be done via Lua versions, i.e as @offer-shmuely has been doing already, and give people the choice of what they want - basic or extended/enhanced versions, while also making it so it's not locked bound to the firmware so changes can be made more easily by others. But, we also need to look at proper coding/memory management for the Lua widgets provided as standard as pointed out by someone else elsewhere, and make sure they only use memory when they're actually in use (i.e. use the loadable design). |
Beta Was this translation helpful? Give feedback.
-
In principle you could limit the refresh to be done on the call of the display function of the widget. It is only called when visible, and I doubt that LCD commands are dynamic (drw.source won't update based on the source value between calls to the widget display function.). What is the widget cycle frequency? |
Beta Was this translation helpful? Give feedback.
-
Would that mean that the widget display function is called 10 or 5 times per second. When not waiting for input, this may be lowered, but when waiting for input this is already on the limit for responsibility. So this all is pointing towards lua script control on updating the screen. Or checking if one of the draw functions is called at all in that cycle of the widget display function call. |
Beta Was this translation helpful? Give feedback.
-
Another method will be a configuration on widget code to set the refresh rate requested. is there a way to mesure the cpu and memory of specific widget while it is on the background or not used at all? |
Beta Was this translation helpful? Give feedback.
-
This would have me switch between 1000 seconds and minimum refresh rate everytime I want to refresh. Lettung the Liz scripter set the pace seems better to me. |
Beta Was this translation helpful? Give feedback.
-
Here's the Outputs Widget in LUA: https://gist.github.com/DavBfr/b6e3619eaffd3e5a5f5828d72c957930 |
Beta Was this translation helpful? Give feedback.
-
All the C++ Widgets can now be replaced with LUA equivalents, the code is merged #2279 #2275 #2208 The basic widgets are implemented here: https://github.com/DavBfr/etx-tetris/tree/main/src Typescript transpiled to LUA.
The Widgets Settings and the Widget name can be translated and are not limited to a LUA variable. |
Beta Was this translation helpful? Give feedback.
-
How do you overcome the missing api? |
Beta Was this translation helpful? Give feedback.
-
Hello together, Sadly i am completly lost with things like compiling, transpiling and all the stuff, but i want to take a little sneak peek at LUA scripting. Therefore i would kindly ask for someone to transpile the default widgets (at least outputs and timer) to functional/working LUA scripts. 🙏 |
Beta Was this translation helpful? Give feedback.
-
So I did review of Widgets included as default in 2.4
Those are currently available in release
Gauge - C in-build
ModelBmp - C in-build
Outputs -C in-build
Text - C in-build
Timer - C in-build
Value - C in-build
BattCheck - LUA SDcard
Timer2 - LUA SDcard
Ghost - LUA SDcard
All of in-build widgets need to be reviewed in terms of bad UI/UX (aligning, icons, colors, scaling etc.)
Of course those in-build need C dev resource that is precious :)
So first question is do we retain in-build widgets or move all of them to LUA SD card area passing development to LUA devs?
Beta Was this translation helpful? Give feedback.
All reactions