Extend VTX Admin disconnect debounce #3459
Merged
+1
−1
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.
Returns DEBOUNCE duration for VTX Admin back to 10s up from 1s (lowered in #3079) to allow a longer time for the RX to reconnect without pushing the VTX Admin MSP again. 50Hz reconnects too slowly.
Reported in bug-reports on Discord for 3.6.2 but I was able to reproduce on 3.x.x-maint and master.
Details
Part of the initial commit for #3079 lowers the VTX Admin debounce timer to 1s, meaning the RX has to reconnect in under 1s or else the VTX Admin will take it as a new connection and push the MSP again. I do not know why this was changed to be so short. The duration has to be long enough to be able to tell a user switching batteries (needs new VTX Admin) and just general disconnect/reconnects due to range or the previous VTX Admin change knocking the RX off. 1s is not always long enough for 50Hz to reconnected (and observed less often in other packet rates such as 250Hz).
The symptom is that SPI RXes will keep reconnecting then disconnecting and we can see here that if it triggers, it becomes quite consistent in the timing and will probably never stop. It doesn't do it every time either. Even at 50Hz it has a pretty good chance of reconnecting quickly and avoiding the condition. Faster rates, which connect faster in general, show it less frequently but will also get stuck in a loop once it starts.
Backport
This needs a backport to 3.x.x-maint