edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Add more than five options to widgets

Open kristjanbjarni opened this issue 2 years ago • 6 comments

Creating complex widgets scripts is very limited currently because of only having maximum of five available options for customizing widgets. I would like to see this maximum raised to allow for more options.

kristjanbjarni avatar Apr 16 '22 13:04 kristjanbjarni

I would have sworn there was an issue for this already, but it seems like there isn't. In my own experience I already hit the limit of options for internal widgets so couldn't implement https://github.com/EdgeTX/edgetx/issues/1095 yet... so wanted to improve that. I'm thinking the simplest way is to make it a fully-screen window, this allow it to scroll normally and such... as the current popup has issues, and really isn't necessary as it's not like it can update dynamically as you change settings.

pfeerick avatar Apr 17 '22 04:04 pfeerick

Yes, full screen makes much more sense. This is a really limiting factor for creating useful and easy to use widgets.

kristjanbjarni avatar Apr 17 '22 17:04 kristjanbjarni

https://github.com/opentx/opentx/pull/8052 maybe these too?

Eldenroot avatar Jul 05 '22 20:07 Eldenroot

Er... 1x2, 1x3, 1x4 layouts already exist in ETX since 2.5... And this is off topic,

pfeerick avatar Jul 05 '22 23:07 pfeerick

The main issue regarding widget options is that for now they use a fixed size array in memory, thus increasing the memory consumption for all models exponentially. So we would need to switch to a list with dynamic allocation instead, which is kind of non-trivial right now. But we should, indeed.

raphaelcoeffic avatar Jul 06 '22 04:07 raphaelcoeffic

Displaying these options is not the issue, we shall find a way ;-)

raphaelcoeffic avatar Jul 06 '22 04:07 raphaelcoeffic

The main issue regarding widget options is that for now they use a fixed size array in memory, thus increasing the memory consumption for all models exponentially.

Is memory really a problem, as this change only applies to color radios?

I tried increasing the widget option count to 10 on my TX16S. RAM usage increased to ~78K.

AFAIK all color radios have 192K RAM so this is still using less than 1/2 what is available.

Dynamic memory (malloc/new) comes out of the heap which is in SDRAM.

philmoz avatar Apr 22 '23 08:04 philmoz