Skip to content

Revert "Add PWM limits" - #3601

Merged
pkendall64 merged 2 commits into
masterfrom
revert-3503-add-pwm-limits
Apr 4, 2026
Merged

pkendall64 merged 2 commits into
masterfrom
revert-3503-add-pwm-limits

Conversation

@pkendall64

Copy link
Copy Markdown
Collaborator

Reverts #3503

Sorry, this should not have been approved and merged. The limits should only apply for gyros and therefor should be part of the gyro PR.

@CapnBry

CapnBry commented Apr 4, 2026

Copy link
Copy Markdown
Member

Thanks, PK and Mickey. Let me take a moment to explain our thinking to @awigen on this.

Problem

ExpressLRS from a user perspective has a complexity problem. Our flexibility means the user is faced with a substantial number of options compared with traditional RC systems that leads to confusion and frustration as to what needs to be set up. Therefore, we need to consider what options are essential to confront the user with.

Adding clipping limits to the standard PWM config interface does not meet the essential requirement. The user can already set their own endpoints using the traditional methods by adjusting them on the handset. Adding a second set of clip limits on the receiver makes no sense to the user when they've already defined their own limits on the handset. The receiver's limits also could imply a scaling function that does not exist (that the input would be scaled to the clip limits).

Adding these to the standard lua also adds 2 more options that should never need to be used by any user who does not have gyros and will generate questions about what should be put there. This also slows down the loading of the receiver's lua over the slow OTA link with no purpose.

Resolution

I know you definitely will need these limits defined for gyro stabilization and I am in support of that, however, these limits should only be presented to the user in that context and not used in the standard PWM output case. These can appear along with the other stabilization settings in a separate specialized webui tab and nested inside the gyro's lua.

I also feel like including this in the context of the gyro stabilization ui allows for a more connected workflow and allows for a richer design there instead of piling it into an already dense table of edit boxes.

Also

There were several bugs in the approved PR such as improper config update and documentation, use of literal numbers which also used the wrong value where constants existed, the tests using assert which is not valid, the test making a requirement that doesn't exist, and the test passing 1 as a pointer which only didn't explode because the test wasn't valid. We can address these later when this is added for gyro support.

# Conflicts:
#	src/html/headers/web-lr1121-rx.h
#	src/html/headers/web-sx127x-rx-8285.h
#	src/html/headers/web-sx127x-rx.h
#	src/html/headers/web-sx128x-rx-8285.h
#	src/html/headers/web-sx128x-rx.h
@pkendall64
pkendall64 merged commit 8861860 into master Apr 4, 2026
52 checks passed
@pkendall64
pkendall64 deleted the revert-3503-add-pwm-limits branch April 4, 2026 19:35
mha1 added a commit to mha1/ExpressLRS that referenced this pull request Apr 6, 2026
mha1 added a commit that referenced this pull request Apr 11, 2026
* - adjusted sane defaults (885, 2135) to real extended limits (880, 2120)

- got rid of magic numbers

* - added V12 info to config_legacy.h

- removed the unnecessary UpgradeEepromV11()
- changed the pwm limits to the min/max PWM possible (stretch mode 476/2523) to avoid clipping in any of modes including stretched modes.

* cleanup after #3601 revert

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants