Skip to content

Conversation

@CapnBry
Copy link
Member

@CapnBry CapnBry commented Oct 19, 2025

Changes behavior of the TX module to now send LinkStats type packets to the handset always, instead of only when the RX is connected. The handset is also notified immediately when the TX module goes to disconnected status instead of simply ghosting the handset eventually. Disconnected status will now be indicated by RQly == 0, which EdgeTX has supported back since the OpenTX days.

The Main "Why?"

I'd like the handset to have knowledge of the current packet mode and transmit power regardless of if an RX is connected. If there's no LinkStats, there's no facility to carry this information, so step 1 is to start sending linkstats all the time. Major blocker after this is on the EdgeTX side, where all telemetry is tied together and if the RX is disconnected, then there's effectively no TX telemetry either. Fixing that is step 2.

Other benefits

  • The handset now does not need to rely on a timeout to trigger "telemetry lost" and the model's disconnection status is updated immediately.
  • The code no longer has that possible weird integer overflow condition which will cause linkstats packets to be spammed continuously for the last 240ms every 42days of uptime. The body is also removed from loop() which we all should be trying to do!
  • Fixes the bug (?) where when the TX sends the bind command, the telemetry in EdgeTX can briefly look like there is an established connection at 50Hz due to a residual LQ being present in the linkstats from any previous connection.

Unrelated

  • Renamed LastTLMpacketRecvMillis to LastTLMpacketRecv_Ms, our more standard naming scheme. Removed "volatile" keyword and made static; there's no way the compiler is going to be caching this value in UpdateConnectDisconnectStatus() even if it gets inlined into loop

@CapnBry CapnBry added enhancement 🪄 New feature or request V4.0 🍔 labels Oct 19, 2025
@ExpressLRS ExpressLRS deleted a comment from sonarqubecloud bot Oct 27, 2025
@CapnBry CapnBry merged commit 83893fe into ExpressLRS:master Oct 29, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V4.0 🍔

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants