Skip to content
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

Background function improvements #308

Merged

Conversation

klutvott123
Copy link
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.
Copy link
Member

@mikeller mikeller left a comment

Choose a reason for hiding this comment

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

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

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