-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Only do SW flow control for 3DR radio #14032
Conversation
The idea of calling this a "3DR radio" can definitely go away, but I don't think this is quite right. As far as I can tell it's always been the receipt of RADIO_STATUS that made it a 3Dr radio. The only difference is where it was set (directly in mavlink receiver thread or not). Let's see if we can drop the "3DR radio" type entirely and treat it generically. Can you verify what RADIO_STATUS looks like for this radio or configuration? https://mavlink.io/en/messages/common.html#RADIO_STATUS Is |
As I mentioned in #14027, the flow control from RADIO_STATUS never seemed to work that well, although I suspect it could be made to work well if someone had time to analyze a few real world scenarios. With that in mind I wouldn't be opposed to adding a mavlink parameter to disable flow control via RADIO_STATUS if it's not possible to make this decision based on the contents of RADIO_STATUS. This would be in addition to dropping |
So the reason we stumbled on this in the first place is because our radio sent 0 in the We could define 255 to be "unknown" in txbuf and disable flow control - but note that the effect is the same as if we were to just send 50% - with fewer lines of code. (or 100% - since it's clamped eventually anyway) I find the notions of "telemetry status" and "radio status" a bit confusing. I have to look at the code a bit more to complete my understanding. Right now I'm thinking of getting rid of the Should I go down that road or is it a dead end anyway? Edit: I don't think getting rid of |
It's a bit muddled now, but |
Yes, that's where this really falls apart. In the past I had some hacks started to expose more SiK radio configuration via mavlink parameters, but I didn't think we'd still be using them for this long. If we really wanted to figure out if it's a SiK radio or not we could try to check the version through the AT interface, but might not be worth it. Anyway, how about a simple parameter to control the use of
Yet another option I'm wondering about is configuration that could force the type at start of the mavlink instance. Multiple mediocre options... |
Ok, here's what I'd propose for the least bad overall option, although at this point if you want to just move forward with the param to disable RADIO_STATUS flow control (perhaps with a different name) that's understandable and fine for now.
|
514fb7d
to
6d492ab
Compare
Codecov Report
@@ Coverage Diff @@
## master #14032 +/- ##
==========================================
- Coverage 54.48% 52.4% -2.09%
==========================================
Files 605 605
Lines 51256 51305 +49
==========================================
- Hits 27929 26886 -1043
- Misses 23327 24419 +1092
|
It's probably time to replace all mention of "3DR radio" with "SiK radio". https://docs.px4.io/v1.9.0/en/telemetry/sik_radio.html |
e15af02
to
39b8250
Compare
@dagar Rebased and default param value set to reflect the old behavior. |
We need to re-evaluate the behavior on a SiK radio without hardware flow control (CTS/RTS pins) to either update that RADIO_STATUS throttling logic or perhaps even remove it. For now the safe thing to do is maintain the existing behavior, but now at least it can be optionally disabled for these newer systems. |
Since the removal of the
type
field in #10395, the type of a radio was always assumed to be 3DR. Removal made sense, because the corresponding mavlink message does not contain a type field.Consequently, when other components report a
radio_status
, the mavlink instance would be automatically using software flow control. This isn't always desired.This fixes #14027