Broadcast VRx-initiated channel changes over ESP-NOW - #242
Open
bob9 wants to merge 1 commit into
Open
Conversation
When the goggles send MSP_ELRS_BACKPACK_SET_CHANNEL_INDEX (0x0301) up the UART (HDZero "Send VTX" / channel follow), the VRX backpack previously dropped it - the UART dispatch only handled SET_MODE, GET_VERSION, GET_STATUS and SET_PTR. Forward it via ESP-NOW as MSP_SET_VTX_CONFIG (89), the opcode peers act on over the air: VRX backpacks in the bind group retune their goggles, and TX backpacks already pass it to the handset (ProcessMSPPacketFromPeer), enabling VTX admin to follow the goggle channel. Guarded to command packets with a valid 48-entry table index. No echo risk: the goggles send no response to 0x0301, the sender does not receive its own ESP-NOW broadcast, and receivers dedup an unchanged channel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When the goggles send
MSP_ELRS_BACKPACK_SET_CHANNEL_INDEX(0x0301) up the UART (e.g. HDZero goggles "Send VTX" / a channel change made on the goggles), the VRX backpack currently drops it — the UART dispatch inMSPModuleBase::Looponly handlesSET_MODE,GET_VERSION,GET_STATUSandSET_PTR.This PR forwards it over ESP-NOW as
MSP_SET_VTX_CONFIG(89), the opcode peers already act on over the air:MSP_SET_VTX_CONFIGhandling inVrx_main.cpp).MSP_SET_VTX_CONFIGfrom a peer straight to the handset (ProcessMSPPacketFromPeerinTx_main.cpp, added in Enable MSP_SET_VTX_CONFIG ESP-NOW input message #95), so VTX admin can follow the goggle channel and retune the quad's VTX.No TX-side changes are required.
Details
MSP_PACKET_COMMANDpackets with a valid 48-entry table index (payload[0] < 48).MSP_SET_VTX_CONFIGrather than forwarding the packet as-is.Testing
Tested with HDZero Goggles 2 (VRX backpack) + RadioMaster Boxer (TX backpack): changing channel on the goggles updates the other bound goggles and the handset's VTX admin channel.