-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
feat(color): Run widget 'background' function while in setup pages. #4393
Conversation
Thanks Phil. I built and ran your PR with a script that has some load in background(). Works fine. |
Please verify that your special functions are still enabled... i.e. with the default theme there will be a yellow filled square on the right side of the sf overview screen if a function is enabled. |
I don't have a X12S but built Companion based on #4393. Running my test widget script (https://github.com/EdgeTX/edgetx/files/13624506/bckgrnd.zip - see #4279 (comment)) works fine. Background calculation results (approximating Pi) and debug output confirms this PR is working fine. |
@Kevltan your script is wrong. try this: main.lua.txt (remove the .txt) |
What did you change??
|
I don't understand what you're saying. Your main.lua doesn't work in the background because you don't call the part that is required to run in the background in the background function. I have changed your script, it should work now. So try the version I uploaded. It's called main.lua.txt because github doesn't allow .lua files to be uploaded. Just click here https://github.com/EdgeTX/edgetx/files/13637615/main.lua.txt, download the file, then rename it from main.lua.txt to main.lua Then copy main.lua to your widget script folder (WIDGETS/TD-RDT) |
Ok thanks for that 😊👍Will try that🤞. Have looked at the change you made can see where I went wrong!! |
how does it fail? |
My bad forgot about the *.text🤷♂️🤷♂️ |
I hope you are aware to flash this PR: https://github.com/EdgeTX/edgetx/suites/18891839239/artifacts/1102977052 |
Yes done all of that but still no joy PR#4395 and your lua edit.
Have tried changing the backgroundProcessWidget(Me) to background(Me) this
doesn't work. Having moved off the widget screen and into the telemetry
screen I lose the value in FCAL, turns red after 30 seconds and "sensor
lost" is announced. Your lua edit works (like this and will keep) but function background still doesn't (at least with my X12S)!
…On Mon, 11 Dec 2023, 16:43 Michael, ***@***.***> wrote:
I hope you are aware to flash this PR:
https://github.com/EdgeTX/edgetx/suites/18891839239/artifacts/1102977052
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFAWYJAURZHXSO2JL6W4DYI4Z45AVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGQ2TOMJSGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Do you have a receiver connected? FCAL will remain red if there is no live telemetry. Works fine on my NV14 FCAL is updating but red as long as there is no receiver connected |
Yes, I do have receiver on. I move out of widget screen into telemetry
screen and after 30 seconds I lose the FCAL and the value turns red. It is
the only telemetry that doesn't have the "flashing" dot on it. I would try
it on my TX16s but I am using an ACCESS Receiver.
…On Mon, 11 Dec 2023, 17:39 Michael, ***@***.***> wrote:
Do you have a receiver connected? FCAL will remain red if there is no live
telemetry. Works fine on my NV14 FCAL is updating but red as long as there
is no receiver connected
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFAWZDNRAC4ZN4ZIDRASDYI5ANPAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGU2TMNRYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Does the TD-RDT Widget run on your NV14?
…On Mon, 11 Dec 2023, 17:55 Kev the Rev, ***@***.***> wrote:
Yes, I do have receiver on. I move out of widget screen into telemetry
screen and after 30 seconds I lose the FCAL and the value turns red. It is
the only telemetry that doesn't have the "flashing" dot on it. I would try
it on my TX16s but I am using an ACCESS Receiver.
On Mon, 11 Dec 2023, 17:39 Michael, ***@***.***> wrote:
> Do you have a receiver connected? FCAL will remain red if there is no
> live telemetry. Works fine on my NV14 FCAL is updating but red as long as
> there is no receiver connected
>
> —
> Reply to this email directly, view it on GitHub
> <#4393 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ANPFAWZDNRAC4ZN4ZIDRASDYI5ANPAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGU2TMNRYGA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
yes it runs. ok, strange. working different on my NV14. |
keeps going for minutes now https://github.com/EdgeTX/edgetx/assets/5615068/577d2ffa-db45-4ef2-84f9-d8b4e252b7cc |
Your getting the flashing dot and your running my widget - very strange!!!!
Maybe I have too many sensors or something!!
…On Mon, 11 Dec 2023, 18:10 Michael, ***@***.***> wrote:
keeps going for minutes now
https://github.com/EdgeTX/edgetx/assets/5615068/577d2ffa-db45-4ef2-84f9-d8b4e252b7cc
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFAW2K3WXD3XDJYJBQDRDYI5EAVAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGYYTINRXGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Going to try a clean firmware install of PR#4393 through
STM32CubeProgrammer and see what happens!
…On Mon, 11 Dec 2023, 18:22 Kev the Rev, ***@***.***> wrote:
Your getting the flashing dot and your running my widget - very
strange!!!! Maybe I have too many sensors or something!!
On Mon, 11 Dec 2023, 18:10 Michael, ***@***.***> wrote:
> keeps going for minutes now
> https://github.com/EdgeTX/edgetx/assets/5615068/577d2ffa-db45-4ef2-84f9-d8b4e252b7cc
>
> —
> Reply to this email directly, view it on GitHub
> <#4393 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ANPFAW2K3WXD3XDJYJBQDRDYI5EAVAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGYYTINRXGQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
WORKING YIPEE!!!!!
…On Mon, 11 Dec 2023, 18:26 Kev the Rev, ***@***.***> wrote:
Going to try a clean firmware install of PR#4393 through
STM32CubeProgrammer and see what happens!
On Mon, 11 Dec 2023, 18:22 Kev the Rev, ***@***.***> wrote:
> Your getting the flashing dot and your running my widget - very
> strange!!!! Maybe I have too many sensors or something!!
>
> On Mon, 11 Dec 2023, 18:10 Michael, ***@***.***> wrote:
>
>> keeps going for minutes now
>> https://github.com/EdgeTX/edgetx/assets/5615068/577d2ffa-db45-4ef2-84f9-d8b4e252b7cc
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#4393 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ANPFAW2K3WXD3XDJYJBQDRDYI5EAVAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGYYTINRXGQ>
>> .
>> You are receiving this because you were mentioned.Message ID:
>> ***@***.***>
>>
>
|
Now all I want please is someone to do a PR for 2.9.2 that does the same,
because 2.10 does not work properly for the X12S (sound).
…On Mon, 11 Dec 2023, 18:34 Kev the Rev, ***@***.***> wrote:
WORKING YIPEE!!!!!
On Mon, 11 Dec 2023, 18:26 Kev the Rev, ***@***.***> wrote:
> Going to try a clean firmware install of PR#4393 through
> STM32CubeProgrammer and see what happens!
>
> On Mon, 11 Dec 2023, 18:22 Kev the Rev, ***@***.***> wrote:
>
>> Your getting the flashing dot and your running my widget - very
>> strange!!!! Maybe I have too many sensors or something!!
>>
>> On Mon, 11 Dec 2023, 18:10 Michael, ***@***.***> wrote:
>>
>>> keeps going for minutes now
>>> https://github.com/EdgeTX/edgetx/assets/5615068/577d2ffa-db45-4ef2-84f9-d8b4e252b7cc
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#4393 (comment)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/ANPFAW2K3WXD3XDJYJBQDRDYI5EAVAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGYYTINRXGQ>
>>> .
>>> You are receiving this because you were mentioned.Message ID:
>>> ***@***.***>
>>>
>>
|
Tested on Yaapu in background which generates 8 virtual sensors with Ardupilot and ELRS, all continue to work just fine in setup=>telemetry screen, without this PR they would obviously stop working. |
@philmoz I tried recompiling the firmware today from the main branch with your PR but it generates an annoying screen flicker on my X10S Express, could you check if it does this to you too? |
There's nothing in this PR that should affect screen display - can you post a video showing the issue. |
I have not tried for now to recompile the firmware without your PR, so I do not rule out that it may also be in one of the latest commits the problem. 20231219_084815_0.mp4 |
I can't think of any reason why this PR would cause that to happen. |
Yes, the problem is elsewhere, i'm sorry, I report that. |
6631745
to
bdbf8b0
Compare
This pr works great on my tx16s and three different lua widgets in the background |
bdbf8b0
to
71648d4
Compare
It would be great if this pr came with 2.10. Is there anything against it? |
I have no views either way... this was simply not slated as an intended feature for 2.10 right from the start. Given users like @robustini have been using with Lua widgets such as Yaapu it since it was released @Kevltan with builds of 2.9 is reasonable to consider it, since it can be scrapped in 2.10.1 if something goes wrong. So I see reports of X10, X12 and TX16S? Yappu, TD-RDT... any other widgets like iNav Lua? |
Possibly 2.11.0 then? Still using Phils latest push to roll it over to 2.11.0 Nightly.
…On Sat, 9 Mar 2024, 02:48 Peter Feerick, ***@***.***> wrote:
I have no views either way... this was simply not slated as a intended
feature for 2.10 right from the start.
Given users like @robustini <https://github.com/robustini> have been
using with Lua widgets such as Yaapu it since it was released it is
reasonable to consider. So I see reports of X10, X12 and TX16S? Yappu,
TD-RDT... any other widgets like iNav Lua?
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFAW6SDTUNEARKRIKU3STYXJ2A7AVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG4YDGNJTGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Don't you mean 2.10? 🤣
…On Sat, 9 Mar 2024, 4:41 pm Kevin, ***@***.***> wrote:
Possibly 2.11 then?
On Sat, 9 Mar 2024, 02:48 Peter Feerick, ***@***.***> wrote:
> I have no views either way... this was simply not slated as a intended
> feature for 2.10 right from the start.
>
> Given users like @robustini <https://github.com/robustini> have been
> using with Lua widgets such as Yaapu it since it was released it is
> reasonable to consider. So I see reports of X10, X12 and TX16S? Yappu,
> TD-RDT... any other widgets like iNav Lua?
>
> —
> Reply to this email directly, view it on GitHub
> <#4393 (comment)>,
or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ANPFAW6SDTUNEARKRIKU3STYXJ2A7AVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG4YDGNJTGE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJ66KPJMS2JSXX4O6FOXR3YXKVJRAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG42TEMRQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Nightly is coming up on my radio as 2.11.0 now !? I have version number come up at the bottom of the screen (I added version update in my widget). My widget is seeing 2.11. 0 since the new 2.10 RC1. |
Yes, 2.10 line as been created with RC1 and splitted from main. Thats the normal process |
So I am correct in saying and my radio widget is saying Nightly 2.11.0? |
Yes, correct. Current nightly are 2.11 as they include now features that will/might not be in 2.10, but 2.11 2.10 evolution is now made of 2.10 branch, not main anymore |
👍👍👍 |
That wasn't the point I as making... why
when the discussion is that it might be included into 2.10 ;)
|
My 2 cents |
I made a LUA script some time ago to be able to test this under various load and overload conditions, see #4279. Works as expected. I am convinced this is 2.10 worthy. |
Absolutely, also because for those who use LUA in the background it is essential. |
great job. Thx to all of you |
I'm not see any issues either on TX16S w/ iNav, Yappu widgets, or Michael's load test widget... UI and radio were no less responsive or usable than normal... time to more eyes on on ;) |
🙂👍
…On Mon, 11 Mar 2024, 01:57 Peter Feerick, ***@***.***> wrote:
Merged #4393 <#4393> into main.
—
Reply to this email directly, view it on GitHub
<#4393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPFAW6OZAMHMMMOL7ZKA73YXUFPJAVCNFSM6AAAAABANK4X4CVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA3DOMRRGE2TKMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Fixes #4279
All setup pages inherit from the Page or TabsGroup (via PageTab) classes. These block the main view so no main view updates are processed while in the setup pages.
This PR adds a function to call just the 'background' function for all active widgets when using the setup pages. It does not call any of the UI objects 'checkEvents' functions so the only overhead is the processing time each widget 'background' call takes. So long as the widgets are well behaved, and there is not an excessive number of them it should not significantly affect performance.
However it needs extensive testing on a variety of radios especially with complex widget setups (which I don't use).