Skip to content

Fix RX v9 to v10 upgrade and add servo failsafe11/stretch - #3391

Merged
CapnBry merged 8 commits into
ExpressLRS:masterfrom
CapnBry:v10-rx-conf
Nov 13, 2025
Merged

CapnBry merged 8 commits into
ExpressLRS:masterfrom
CapnBry:v10-rx-conf

Conversation

@CapnBry

@CapnBry CapnBry commented Nov 7, 2025 •

Copy link
Copy Markdown
Member

Updates the RxConfig upgrade from 3.x.x to master (v9 to v10) so that it doesn't lose all its config along the way. Also adds 2 fields we need for 4.0 while I was doing the conversion, making RX config version 11

Users running on master will have their config "reinterpreted" to these values, meaning their PWM config will be garbled up. I suppose we can add a V11 and make the update migrate the master V10 PWM to this's V10 if we think this is a big deal. Added V11

Porblem

Upgrading from 3.x.x to master, you'll note that the receiver goes into bind mode. If you reboot the RX it seems fine, but this is only if you flashed with a bind phrase, and the second reboot copies the bind information because it looks like a new flash. All RX config is lost in the upgrade except 3 fields:

  • powerOnCounter
  • forceTlmOff
  • rateInitialIdx

I've updated the structure of the code so it is a bit more obvious that you don't just set the fields that change structure, you have to copy ALL the fields over because the config structure is default apart from what you set. This is not a chaining upgrade system. I've also updated the code in the other upgrades (which were working properly) to be of the same shape so it might be easier to copy paste from them in future versions.

New Fields

Because this has to do the upgrade anyway, I also updated the PWM config structure to support things that are on 4.0 project including #2773 and the failsafe range PR coming in the next day or so. I didn't want to have to validate config upgrades again for both those PRs so they can just rebase onto this and avoid having to figure out the system.

  • PWM failsafe 10 bit -> 11 bit
  • Add PWM stretch bit - I added this before the narrow bit. My thinking is that we are going to remove inverted from the webui in the stretch PR, so this will open up the bit to become "unused" later and possibly stretch will become 2 bits for a different kind of stretch option if needed.

@pkendall64 pkendall64 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit

Comment thread src/lib/CONFIG/config.cpp Resolved
Comment thread src/html/scan.js Resolved
@CapnBry CapnBry changed the title Fix v9 to v10 upgrade and add servo failsafe11/stretch Fix RX v9 to v10 upgrade and add servo failsafe11/stretch Nov 11, 2025
@CapnBry

CapnBry commented Nov 11, 2025

Copy link
Copy Markdown
Member Author

Updated with DShot3D, also fixes update from v9 not bringing somSerial up to date. Tested with 3.3.0 (v7), 3.4.0 (v9).

@CapnBry
CapnBry merged commit 065acc6 into ExpressLRS:master Nov 13, 2025
@CapnBry
CapnBry deleted the v10-rx-conf branch November 15, 2025 15:49
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.

3 participants