Add extra check for 2RSS to better work with true diversity receivers #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
True diversity receivers only have one "side" active at a time, so they report either 1RSS or 2RSS, with the other being 0, specially at startup. If, during startup, only 2RSS is active and reported, the widget doesn't recognize the Rx connection and keeps displaying the "No RX connected" message until 1RSS become active, which depending on the Rx environment, can take a while (it will usually only be activated once the RF link strength on the 2RSS "side" falls significantly). But since the 2RSS "side" is working properly, the Rx IS connected and working normally, so the widget can be misleading. This is the behavior I experienced with two distinct Happymodel EP1 Dual TCXO's.
This change aims to fix that, by checking that both 1RSS and 2RSS are zero (or nil) before considering as no RX connected. If either of them (or both) is non-zero (i.e. active), it considers as a normal connection.
I have tested with both EP1 Duals and some other non-diversity Rx's and it seems to work properly, but further testing is more than welcome.