Skip to content

Conversation

@JyeSmith
Copy link
Member

@JyeSmith JyeSmith commented Oct 1, 2024

This PR does 3 fixes;

  • Prevent the VTx Admin from racking up MSP packets on Tx boot and without a connected Rx. This is due to pitmodeAuxState not being initialised correctly.
  • Reinstates VTx MSP sends on TLM connection. I dont know when this was removed.
  • Fix eeprom writes by making sure they are sent on the first VTx MSP sends after Tx module boot.

@NameOfTheDragon
Copy link

NameOfTheDragon commented Oct 1, 2024

Before reinstating the MSP sends on TLM connection, maybe review this: #1812 - I did not agree with how this was resolved at the time.

It can fail the "principle of least astonishment" if the VTX is being configured via Betaflight, eg I use my 6-way switch to control the VTX tx power setting. Then suddenly in mid-flight, TLM disconnects and reconnects, and ELRS reconfigured the VTX in-flight which can have very bad consequences. I don't know if this is why it was taken out, but reconfiguring the VTX in-flight is, I think, almost always a bad idea.

@pkendall64
Copy link
Collaborator

There was a resolution in #1812 that says if you are using any other method to set the VTX power level, then you should set the VTX admin power level to - so it is then NOT sent to the FC/VTX.

@JyeSmith JyeSmith force-pushed the prevent-vtx-msp-on-tx-boot branch from e9e0744 to f7d2f27 Compare October 4, 2024 07:57
@JyeSmith JyeSmith requested a review from pkendall64 October 4, 2024 08:06
@JyeSmith JyeSmith merged commit e248004 into 3.x.x-maintenance Oct 5, 2024
@JyeSmith JyeSmith deleted the prevent-vtx-msp-on-tx-boot branch October 5, 2024 09:02
@CapnBry
Copy link
Member

CapnBry commented Nov 27, 2024

I'm tagging myself onto this PR because the added VtxTriggerSend() breaks SPI RXs, which connect, then get a VTX update and forced save, which paused the FC/RX and drops the connection. It immediately reconnects (many times without even without there being any indication on the handset) which causes another VtxTriggerSend() and the cycle repeats indefinitely.

Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:500
TLM crc error
UART STATS Bad:Good = 0:501
got downlink conn
UART STATS Bad:Good = 0:500
Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:500
UART STATS Bad:Good = 0:501
got downlink conn
UART STATS Bad:Good = 0:500
Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:500
UART STATS Bad:Good = 0:501
got downlink conn
UART STATS Bad:Good = 0:500
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:500
UART STATS Bad:Good = 0:501
got downlink conn
UART STATS Bad:Good = 0:500
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:500
UART STATS Bad:Good = 0:501
got downlink conn
UART STATS Bad:Good = 0:500
Sending VtxConfig
$X<Y ▒Sending VtxConfig
$X<Y ▒UART STATS Bad:Good = 0:501
Sending VtxConfig
$X<Y

This solution should be examined as it can also affect normal RX users I think if the timing works out just right, but I'll get back to it at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants