Skip to content

[BACKPORT 1.17] Include PWM Center PR#26317

Merged
sfuhrer merged 2 commits intorelease/1.17from
pr-pwm-cent-fix-117
Jan 22, 2026
Merged

[BACKPORT 1.17] Include PWM Center PR#26317
sfuhrer merged 2 commits intorelease/1.17from
pr-pwm-cent-fix-117

Conversation

@ttechnick
Copy link
Copy Markdown
Member

Solved Problem

Include Servo PWM feature merged here in the release 1.17

Solution

Changelog Entry

For release notes:

Feature: PWM CENTER
New parameter: `PWM_MAIN_CENTx` and PWM_AUX_CENTx`
Documentation: Need to clarify page [Actuator Configuration and Testing](https://docs.px4.io/main/en/config/actuators#output-assignment-and-configuration)  

Test coverage

Testing is covered in the original PR

ttechnick and others added 2 commits January 21, 2026 09:07
Add PWM_*_CENTERx for each servo.
Use a bilinear transform to map actuator_servos to PWM signals.

This solution only works for PWM based servos. Other types of servos are not affected.

* PWM: Add servo trim option

* PWM: Improve documentation of PWM trim feature

* PWM: cleaner clamping and docs typo

* update documentation & safety

* add migration formula

* rename param from trim to center

* docs with center instead of trim

* move clamping and reorder values

* improve documentation

* adress failing range check

* improve documentation

* CA: add event for setting CENTER with TRIM

Signed-off-by: Silvan <silvan@auterion.com>

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
* Add Wheel and Gimbal support to PWM center

* Document Center feature for PWM Gimbal
@ttechnick ttechnick requested a review from sfuhrer January 21, 2026 08:16
@ttechnick ttechnick changed the title [1.17] Include PWM Center PR [BACKPORT 1.17] Include PWM Center PR Jan 21, 2026
@github-actions
Copy link
Copy Markdown

No flaws found

@github-actions
Copy link
Copy Markdown

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 1256 byte (0.06 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.1% +1.23Ki  +0.1% +1.23Ki    .text
  +155%    +340  +155%    +340    ActuatorEffectivenessControlSurfaces::updateParams()
  +0.2%    +276  +0.2%    +276    g_cromfs_image
  +0.1%    +236  +0.1%    +236    [section .text]
  +122%    +176  +122%    +176    MixingOutput::output_limit_calc_single()
  +0.5%     +72  +0.5%     +72    px4::parameters
   +16%     +56   +16%     +56    ActuatorEffectivenessControlSurfaces::ActuatorEffectivenessControlSurfaces()
   +13%     +36   +13%     +36    MixingOutput::initParamHandles()
  +7.5%     +24  +7.5%     +24    MixingOutput::updateParams()
  +3.8%      +8  +3.8%      +8    DShot::handle_new_telemetry_data()
  +1.9%      +8  +1.9%      +8    MixingOutput::output_limit_calc()
  +3.6%      +8  +3.6%      +8    MixingOutput::printStatus()
  +0.4%      +8  +0.4%      +8    px4::parameters_type
  +0.8%      +4  +0.8%      +4    MixingOutput::MixingOutput()
  +0.8%      +4  +0.8%      +4    ModuleBase<>::unlock_module()
  +0.7%      +4  +0.7%      +4    PX4IO::PX4IO()
   +44%      +4   +44%      +4    g_nullstring
  -1.0%      -4  -1.0%      -4    EKFGSF_yaw::fuseVelocity()
  -4.5%      -4  -4.5%      -4    FlightTask
+0.0%    +359  [ = ]       0    .debug_abbrev
+0.0%     +16  [ = ]       0    .debug_aranges
+0.0%     +84  [ = ]       0    .debug_frame
+0.1% +17.6Ki  [ = ]       0    .debug_info
+0.0% +1.19Ki  [ = ]       0    .debug_line
   +67%      +2  [ = ]       0    [Unmapped]
  +0.0% +1.19Ki  [ = ]       0    [section .debug_line]
+0.0% +1.12Ki  [ = ]       0    .debug_loclists
+0.1%    +326  [ = ]       0    .debug_rnglists
 -50.0%      -1  [ = ]       0    [Unmapped]
  +0.1%    +327  [ = ]       0    [section .debug_rnglists]
+0.0%    +406  [ = ]       0    .debug_str
+1.3%      +3  [ = ]       0    .shstrtab
+0.0%     +65  [ = ]       0    .strtab
  +112%     +65  [ = ]       0    ActuatorEffectivenessControlSurfaces::updateParams()
   +15%     +16  [ = ]       0    ___ZN39ControlAllocationSequentialDesaturation23computeDesaturationGainERKN6matrix6VectorIfLj16EEES4__veneer
 -51.6%     -16  [ = ]       0    __ioctl_veneer
+0.0%     +64  [ = ]       0    .symtab
   +67%     +64  [ = ]       0    ActuatorEffectivenessControlSurfaces::updateParams()
  +100%     +32  [ = ]       0    EKFGSF_yaw::fuseVelocity()
 -25.0%     -16  [ = ]       0    MixingOutput::actualFailsafeValue()
  +100%     +16  [ = ]       0    MixingOutput::limitAndUpdateOutputs()
 -50.0%     -16  [ = ]       0    MixingOutput::updateParams()
  -0.1%     -16  [ = ]       0    [section .symtab]
   +67%     +32  [ = ]       0    ___ZN39ControlAllocationSequentialDesaturation23computeDesaturationGainERKN6matrix6VectorIfLj16EEES4__veneer
 -40.0%     -32  [ = ]       0    __ioctl_veneer
 +34% +2.77Ki  [ = ]       0    [Unmapped]
+0.1% +25.2Ki  +0.1% +1.23Ki    TOTAL

px4_fmu-v6x [Total VM Diff: 1120 byte (0.06 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.1% +1.09Ki  +0.1% +1.09Ki    .text
  +155%    +340  +155%    +340    ActuatorEffectivenessControlSurfaces::updateParams()
  +0.2%    +256  +0.2%    +256    g_cromfs_image
  +0.1%    +228  +0.1%    +228    [section .text]
  +122%    +176  +122%    +176    MixingOutput::output_limit_calc_single()
  +0.5%     +72  +0.5%     +72    px4::parameters
   +16%     +56   +16%     +56    ActuatorEffectivenessControlSurfaces::ActuatorEffectivenessControlSurfaces()
   +13%     +36   +13%     +36    MixingOutput::initParamHandles()
  +7.5%     +24  +7.5%     +24    MixingOutput::updateParams()
  +3.8%      +8  +3.8%      +8    DShot::handle_new_telemetry_data()
  +1.9%      +8  +1.9%      +8    MixingOutput::output_limit_calc()
  +3.6%      +8  +3.6%      +8    MixingOutput::printStatus()
  +0.4%      +8  +0.4%      +8    px4::parameters_type
  +1.0%      +4  +1.0%      +4    EKFGSF_yaw::fuseVelocity()
  +0.8%      +4  +0.8%      +4    MixingOutput::MixingOutput()
  +0.7%      +4  +0.7%      +4    PX4IO::PX4IO()
  -5.6%      -4  -5.6%      -4    ConstLayer::containedAsBitset()
 -25.0%      -4 -25.0%      -4    ConstLayer::contains()
 -14.3%      -4 -14.3%      -4    ConstLayer::get()
  -0.8%      -4  -0.8%      -4    ModuleBase<>::unlock_module()
  -4.5%     -20  -4.5%     -20    param_reset_specific
 -102.1%     -76 -102.1%     -76    [21 Others]
+0.0%    +359  [ = ]       0    .debug_abbrev
+0.0%     +16  [ = ]       0    .debug_aranges
+0.0%     +64  [ = ]       0    .debug_frame
+0.1% +17.0Ki  [ = ]       0    .debug_info
+0.0% +1.10Ki  [ = ]       0    .debug_line
  [NEW]      +2  [ = ]       0    [Unmapped]
  +0.0% +1.09Ki  [ = ]       0    [section .debug_line]
+0.0% +1.10Ki  [ = ]       0    .debug_loclists
+0.1%    +314  [ = ]       0    .debug_rnglists
+0.0%    +417  [ = ]       0    .debug_str
-0.4%      -1  [ = ]       0    .shstrtab
+0.0%     +65  [ = ]       0    .strtab
  +112%     +65  [ = ]       0    ActuatorEffectivenessControlSurfaces::updateParams()
+0.0%     +64  [ = ]       0    .symtab
   +67%     +64  [ = ]       0    ActuatorEffectivenessControlSurfaces::updateParams()
  +100%     +16  [ = ]       0    ConstLayer::containedAsBitset()
  +100%     +16  [ = ]       0    ConstLayer::contains()
 -33.3%     -16  [ = ]       0    ConstLayer::store()
   +25%     +16  [ = ]       0    DynamicSparseLayer::DynamicSparseLayer()
 -50.0%     -32  [ = ]       0    EKFGSF_yaw::fuseVelocity()
 -25.0%     -16  [ = ]       0    MixingOutput::actualFailsafeValue()
  +100%     +16  [ = ]       0    MixingOutput::limitAndUpdateOutputs()
 -50.0%     -16  [ = ]       0    MixingOutput::updateParams()
  +100%     +16  [ = ]       0    param_for_index
  +100%     +16  [ = ]       0    param_get_index
 -25.0%     -16  [ = ]       0    param_import_internal()
 +72% +2.91Ki  [ = ]       0    [Unmapped]
+0.1% +24.5Ki  +0.1% +1.09Ki    TOTAL

Updated: 2026-01-21T08:23:56

Copy link
Copy Markdown
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

It's definitely a cool new feature and it got quite some testing in the last weeks, I would ok to merge it to the release branch as well.
But strictly speaking it's a feature and not a bug.
What's your take on it @dakejahl ?

Copy link
Copy Markdown
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

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

I'm cool with it, I took a quick look and it all looks good to me

@sfuhrer sfuhrer merged commit 2a78d7d into release/1.17 Jan 22, 2026
74 of 76 checks passed
@sfuhrer sfuhrer deleted the pr-pwm-cent-fix-117 branch January 22, 2026 12:53
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