-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Allow for quicker updates of OSD element data #11207
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
base: master
Are you sure you want to change the base?
Conversation
This allows *X* elements to be updated per OSD cycle. From 1 element (current behaviour) to 15 elements. This should allow for plenty of data update speed without causing unnecessary delays or overheads. This defaults to 5, which should be a good value for most OSDs. - It maintains the protections for end of loop and no elements enabled - Will exit automatically if there are less elements to draw than set to be drawn per cycle. - A check has been added to see if the AHI is enabled before drawing it
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
|
Awesome. Have you run "tasks" on this? |
|
No yet. I've just written it on my laptop. I've published the branch and this draft PR to move to my desktop and test this out on the FC shortly. |
|
The batch based approach is slower in terms of CPU time compared to the Hz-based approach discussed here: #11206 (comment) |
True, but that's measuring something that does not matter, directly. It's measuring the amount of time the CPU is sitting idle, doing nothing. Sitting idle is not advantageous. They key is to finish on time, every time, to avoid blocking the PID task that needs to run every 0.5ms. Better to say "I never blocked the PID task" than to say "I blocked the PID loop from running, then did nothing for a while". |
The small different in time for the batch process is spread over multiple loops. So doesn't cause the block to other processes that happen when all the elements are drawn in the Hz method. Also the Hz method is currently missing the call to |
This allows X elements to be updated per OSD cycle. From 1 element (current behaviour) to 15 elements. This should allow for plenty of data update speed without causing unnecessary delays or overheads. This defaults to 5, which should be a good value for most OSDs. The OSD is updated at 250Hz, on a low priority, by the task scheduler. The elements are updated at 1/4 this frequency (62.5Hz).
Update rates based on current update method
Update rates based on the new default of 5 elements per cycle
So even on the default setting
5, having 26-30 elements. They would update 10 times per second. Fast enough for any OSD element.Alternative option to #11206
Fixes #9907