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 script halves packet rates #501

Closed
bastian2001 opened this issue Feb 19, 2024 · 8 comments
Closed

Background script halves packet rates #501

bastian2001 opened this issue Feb 19, 2024 · 8 comments
Labels

Comments

@bastian2001
Copy link

Describe your problem

When the Betaflight background script runs on the remote, only half of the RC packets are transmitted.

Reproduction

Run Background script and count the packets. Either how often a new packet arrives (time delta) or via a packet counter. I first noticed this with my own FC, but also using the blackbox I recorded on an off the shelf FC.

Hardware and software

  • Remote: Radiomaster TX16S with EdgeTX 2.9.4
  • Radiomaster Ranger Micro running ELRS 3.3.2
  • Radiomaster RP1 running ELRS 3.3.2
  • JHEMCU F722 running Betaflight 4.4

I believe that this information is all that is necessary to reproduce the issue. However, I am referring to this issue I previously posted over at EdgeTX and this issue on ExpressLRS, that were needed to find out that the LUA script was actually the issue.

@schugabe
Copy link

This is no bug of the lua script and no expresslrs bug: ExpressLRS/ExpressLRS#2564 (comment)

@bastian2001
Copy link
Author

@schugabe I recommend you read the issue over on ExpressLRS (the one where you commented) in detail, to understand why there is in fact a bug and why it is related to the BF Background Lua. If you disagree, please tell me why simply running the BF Background Lua halves the packet rate, or do the described test yourself.

@klutvott123
Copy link
Member

The BF background script is used for setting the RTC on the FC and for rssi IF there's no other rssi source available. If other sources are available it won't do anything after the RTC has been set. If using ELRS there is already rssi sources available from the RX

Copy link

github-actions bot commented Apr 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@bastian2001
Copy link
Author

The BF background script is used for setting the RTC on the FC and for rssi IF there's no other rssi source available. If other sources are available it won't do anything after the RTC has been set. If using ELRS there is already rssi sources available from the RX

Yeah, but RTC sync does not need to happen during flight, right? How about only transmitting RTC when the script sees the quad connect once, and not continuously sending updates?

@github-actions github-actions bot removed the Inactive label Apr 8, 2024
@klutvott123
Copy link
Member

@bastian2001 no it doesn't, but to block it during flight we would have to request the arming status from the FC, which is also MSP, which would also halve the packet rate due to ELRS increasing the telemtry rate for MSP frames.
The script IS transmitting RTC when the quad is first connected, and it keeps sending RTC until it succeeds, and then it stops. If the background script keeps sending something, it's because it couldn't get the API version, or it couldn't set the RTC, or because there's no other RSSI source than MSP available(but that's unlikely as it's ELRS).
Unfortunately we don't have a visual indication for this as it runs as a background script.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

Copy link

Issue closed automatically as inactive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@schugabe @bastian2001 @klutvott123 and others