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
Update RSSI_DBM to include diversity antenna in OSD element (CRSF) #12359
Update RSSI_DBM to include diversity antenna in OSD element (CRSF) #12359
Conversation
This comment has been minimized.
This comment has been minimized.
59764c9
to
73ca8e1
Compare
This comment has been minimized.
This comment has been minimized.
73ca8e1
to
c90e05f
Compare
This comment has been minimized.
This comment has been minimized.
src/main/osd/osd_elements.c
Outdated
tfp_sprintf(element->buff, "%c%3d", SYM_RSSI, getRsnr()); | ||
const int8_t antenna = getActiveAntenna(); | ||
|
||
if (antenna) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Antenna is 0 indexed e.g. Ant 1 = 0.
I haven't tested, but will this only show for Ant 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed if (ant 1 = 0) antenna will fail to the else clause otherwise include the antenna (ant 2 = 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may either cause constant blinking of (2)
, or nothing to be shown and cause confusion to user if the element is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awaiting test results of that (as it should not affect non diversity receivers) - don't have one to test.
The code only adds (1) to RSNR when the second antenna is active.
EDIT: Just changed it by adding +
should work less confusing and without additional configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LoakAudio adding +
to the element indicating using second antenna will have the least impact.
c90e05f
to
3ff65cd
Compare
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
Is it possible to have an "offset" of +1 for the antenna number, to show 1 or 2 as it is labeled on the rx itself instead of 0 or 1 ? |
I just did some testing on this. With a full radio diversity RX, it's kinda hard to fully test. It will use packets from the first radio IRQ that gets a good one, and only falls back on the second if the first packet doesn't get one or gets a bad packet. So what that means is it pretty much sits on one radio until things go bad. In my tests, it fortunately started using the second radio (ant 1), I guess that IRQ fires first. So I immediately saw the I think I would have to start a DVR recording and walk downstairs and out into the garage to really see it switch radios for more than a packet or two. If you'd like that level of evidence, I could set that up later today or tomorrow and post the DVR. But based on what I mentioned above, I think this works as intended. |
Unfortunately I can't test as my FC died rebooting after BF 4.5-zulu + #12359 update. I've had the time to load a backup diff from 4.4 but it never finish any reboot after that. It starts and suddenly disconnect, normal mode or bootloader mode. Linux, Windows and several known working cables tested. I think it's time to buy a new HGLRC F722 mini. |
This comment has been minimized.
This comment has been minimized.
After some conversation on Discord changed the RSSI_DBM element instead of RSNR. |
Just a thought. Instead of adding |
Thanks @SteveCEvans |
This comment has been minimized.
This comment has been minimized.
This may be nitpicky, but seeing |
Hmm, was trying to test this, and the build failed. |
9e5cd38
to
a6dea6f
Compare
This comment has been minimized.
This comment has been minimized.
a6dea6f
to
f8ec3d4
Compare
@glennvenghaus Cool, as I can't test by myself (building 4.5-zulu hex is broken for my FC), do you have a DVR or a link to, to see how it shows in OSD ? |
Sure. Here you go. |
Wait, what, the icon is in the middle? That's not right... My understanding is it should look like the LQ line with the icon first, then antenna:RSSI dBm ( |
isn't it rather -63:2 that we should see ? @glennvenghaus seems to be in HD, maybe something in relation with that ? |
Nah, the case was made to be consistent with the LQ element, which puts mode first, then LQ. So RSSI dBm was changed to put the antenna before the RSSI dBm value. Just scroll up and read the thread for this PR, it's all up there... The icon in the middle is the way the code is written right now (not an HD thing): |
I know and understand this is probably low on the list of prios now , but when do you think this can be merged ? |
45ccaf6
to
7cf2fe8
Compare
This comment has been minimized.
This comment has been minimized.
7cf2fe8
to
af92730
Compare
This comment has been minimized.
This comment has been minimized.
TOP !!! |
@glennvenghaus , does it mean it can be tested with a "zulu" and no additional PR ? 4.4.1 or 4.5 ? |
In betaflight just specify this pr (#12359) in the "select commit " field , replacing the default "master" entry. |
af92730
to
75040bd
Compare
This comment has been minimized.
This comment has been minimized.
Before this gets approved and merged, the icon seems to be out of position with the latest changes: All the other elements have the icon first, and then the values. I think this should be: For example, the LQ element is: |
75040bd
to
b13013d
Compare
Do you want to test this code? Here you have an automated build: |
…etaflight#12359) Add diversity antenna element for CRSF
Fixes: #12358