FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Read lua buffer until empty by klutvott123 · Pull Request #429 · betaflight/betaflight-tx-lua-scripts · GitHub

Read lua buffer until empty - #429

Merged
haslinghuis merged 1 commit into
betaflight:masterfrom
klutvott123:read-lua-buffer-until-empty
Sep 15, 2022
Merged

haslinghuis merged 1 commit into
betaflight:masterfrom
klutvott123:read-lua-buffer-until-empty

Conversation

klutvott123 commented Jan 22, 2022
edited
Loading

Copy link
Copy Markdown
Member

Reads everything from the lua input buffer in one lua cycle.

The current behaviour is to read one frame from the buffer each lua cycle which is approximately every 50ms.

With this change the script will read frames from the buffer until it's empty. This can speed up the page loading significantly depending on the protocol used. For smartport/fport/crossfire it will likely not have a big effect. For smartport we get a lot of small frames at a slow interval and for crossfire the frames are large so the whole payload fits in one or two frames.
For ghost(#419) on the other hand we get small frames at a fast rate so it's possible that the buffer fills up quickly and there are actually multiple frames in the buffer so it makes sense to read them all instead of one small frame every 50ms.

klutvott123 added this to the 1.7 milestone Jan 22, 2022
klutvott123 self-assigned this Jan 22, 2022
klutvott123 marked this pull request as draft June 17, 2022 23:42
klutvott123 force-pushed the read-lua-buffer-until-empty branch from cea9054 to 626cd12 Compare September 14, 2022 16:52
klutvott123 force-pushed the read-lua-buffer-until-empty branch from 626cd12 to 8809aa3 Compare September 14, 2022 17:01
klutvott123 marked this pull request as ready for review September 14, 2022 17:02

Copy link
Copy Markdown
Member Author

This is ready to go. It's important for ghost performance

haslinghuis merged commit 7807026 into betaflight:master Sep 15, 2022
klutvott123 deleted the read-lua-buffer-until-empty branch February 16, 2023 19:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL