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

Background function improvements by klutvott123 · Pull Request #308 · betaflight/betaflight-tx-lua-scripts · GitHub

Background function improvements - #308

Merged
mikeller merged 1 commit into
betaflight:masterfrom
klutvott123:background-function-improvement
Feb 3, 2020
Merged

mikeller merged 1 commit into
betaflight:masterfrom
klutvott123:background-function-improvement

Conversation

Copy link
Copy Markdown
Member

Improved RTC synchronisation by periodically sending the time to the FC until we get the response confirming that the data was received and OK.

Improved rssi functionality by detecting the rssi source set in the FC. Only sends rssi if source is NONE or MSP. Rssi also broken out into it's own file. Unloaded when not needed.

Changed rssi scaling. It is now 0 - 99 to 0 - 255. Chose to do it like this because it doesn't need changes in the firmware and it's backwards compatible with earlier versions. No need for the user to adjust scaling/offset etc.

The INTERVAL is now separate for data_init and rssi. This gives better control over what parts of the code to run at that interval. Previously the buffer was polled at the same interval as the commands were sent. Now it's polled every lua cycle. This speeds up apiVersion detection by up to 0.5 seconds. Same for RTC sync.

Renamed rssi.lua function script to bfbkgd.lua(sorry. 6 char limit). Used "bf" to show where the script comes from to avoid confusion as people might have scripts from different sources in the FUNCTION folder.

Improved RTC synchronisation by periodically sending the time to the FC until we get the response confirming that the data was received and OK.

Improved rssi functionality by detecting the rssi source set in the FC. Only sends rssi if source is NONE or MSP. Rssi also broken out into it's own file. Unloaded when not needed.

Changed rssi scaling. It is now 0 - 99 to 0 - 255. Chose to do it like this because it doesn't need changes in the firmware and it's backwards compatible with earlier versions. No need for the user to adjust scaling/offset etc.

The INTERVAL is now separate for data_init and rssi. This gives better control over what parts of the code to run at that interval. Previously the buffer was polled at the same interval as the commands were sent. Now it's polled every lua cycle. This speeds up apiVersion detection by up to 0.5 seconds. Same for RTC sync.

Renamed rssi.lua function script to bfbkgd.lua(sorry. 6 char limit). Used "bf" to show where the script comes from to avoid confusion as people might have scripts from different sources in the FUNCTION folder.

mikeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good idea to check the firmware settings to determine if sending RSSI values is needed!

mikeller added this to the 1.5 milestone Feb 3, 2020
mikeller merged commit 8f38cb5 into betaflight:master Feb 3, 2020
klutvott123 deleted the background-function-improvement branch February 5, 2020 21:20
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