Skip to content

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Aug 29, 2025

Solved Problem

When I joined PX4 development I assumed this is part of a sophisticated RC calibration plan but in fact it just adds a 1% deadzone to all RC channels 1-8 and does nothing for the rest of the channels 9-18. Pretty random and not something I've seen anyone ever tweak or benefit much from.

The main problem is that if you want a deadzone or not highly depends on the use case of the input. And a deadzone of 1% only helps with very precise stick hardware.

Solution

I suggest to remove this deprecated deadzone mechanism.

The next step is to instead offer one higher-level stick deadzone setting, which also applies to joystick input, only applies in places where a deadzone is necessary/desired and can be adjusted depending on the accuracy of the stick hardware.

Changelog Entry

Remove 1% deadzone for RC channels 1-8

Test coverage

Not tested yet.

@MaEtUgR MaEtUgR self-assigned this Aug 29, 2025
Copy link

github-actions bot commented Aug 29, 2025

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: -968 byte (-0.05 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +55  [ = ]       0    .debug_abbrev
-0.0%     -20  [ = ]       0    .debug_frame
-0.1% -28.6Ki  [ = ]       0    .debug_info
-0.0%    -467  [ = ]       0    .debug_line
  [DEL]      -2  [ = ]       0    [Unmapped]
  -0.0%    -465  [ = ]       0    [section .debug_line]
-0.0%    -201  [ = ]       0    .debug_loclists
+0.0%     +26  [ = ]       0    .debug_rnglists
  [NEW]      +2  [ = ]       0    [Unmapped]
  +0.0%     +24  [ = ]       0    [section .debug_rnglists]
-0.0%    -221  [ = ]       0    .debug_str
 +12%    +968  [ = ]       0    [Unmapped]
-0.1%     -16  -0.1%     -16    .ramfunc
  -1.7%      -4  -1.7%      -4    param_get
  -1.4%      -4  -1.4%      -4    param_get_default_value
 -25.0%      -4 -25.0%      -4    param_get_index
  -8.3%      -4  -8.3%      -4    param_get_system_default_value
-0.0%    -952  -0.0%    -952    .text
  [NEW]     +12  [NEW]     +12    C.47.0
  +2.3%     +12  +2.3%     +12    Commander::control_status_leds()
  +1.0%     +12  +1.0%     +12    Commander::run()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  -3.2%      -8  -3.2%      -8    Commander::checkForMissionUpdate()
  -3.2%     -12  -3.2%     -12    Commander::disarm()
  [DEL]     -16  [DEL]     -16    C.48.0
  -4.5%     -20  -4.5%     -20    param_reset_specific
  -1.0%     -20  -1.0%     -20    px4::parameters_type
  -2.2%     -24  -2.2%     -24    Commander::dataLinkCheck()
 -14.0%     -24 -14.0%     -24    RcCalibrationChecks::RcCalibrationChecks()
 -29.5%     -26 -29.5%     -26    RcCalibrationChecks::updateParams()
  -7.1%     -28  -7.1%     -28    rc_update::RCUpdate::updateParams()
  -2.3%     -32  -2.3%     -32    rc_update::RCUpdate::RCUpdate()
  -3.8%     -44  -3.8%     -44    rc_update::RCUpdate::Run()
  -2.0%     -68  -2.0%     -68    Commander::handle_command()
 -101.3%     -98 -101.3%     -98    [36 Others]
 -16.7%    -100 -16.7%    -100    RcCalibrationChecks::checkAndReport()
  -0.9%    -144  -0.9%    -144    px4::parameters
  -0.1%    -160  -0.1%    -160    g_cromfs_image
  -0.1%    -172  -0.1%    -172    [section .text]
-0.1% -29.4Ki  -0.0%    -968    TOTAL

px4_fmu-v6x [Total VM Diff: -880 byte (-0.04 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +55  [ = ]       0    .debug_abbrev
-0.1% -27.6Ki  [ = ]       0    .debug_info
-0.0%    -361  [ = ]       0    .debug_line
  +250%      +5  [ = ]       0    [Unmapped]
  -0.0%    -366  [ = ]       0    [section .debug_line]
-0.0%     -30  [ = ]       0    .debug_loclists
+0.0%     +39  [ = ]       0    .debug_rnglists
  +200%      +2  [ = ]       0    [Unmapped]
  +0.0%     +37  [ = ]       0    [section .debug_rnglists]
-0.0%    -221  [ = ]       0    .debug_str
 +20%    +880  [ = ]       0    [Unmapped]
-0.0%    -880  -0.0%    -880    .text
  [NEW]     +12  [NEW]     +12    C.47.0
  +2.3%     +12  +2.3%     +12    Commander::control_status_leds()
  +1.0%     +12  +1.0%     +12    Commander::run()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  -3.2%      -8  -3.2%      -8    Commander::checkForMissionUpdate()
  -2.1%      -8  -2.1%      -8    Commander::executeActionRequest()
  -3.2%     -12  -3.2%     -12    Commander::disarm()
  [DEL]     -16  [DEL]     -16    C.48.0
  -0.8%     -16  -0.8%     -16    px4::parameters_type
 -100.8%     -22 -100.8%     -22    [14 Others]
  -2.2%     -24  -2.2%     -24    Commander::dataLinkCheck()
 -14.0%     -24 -14.0%     -24    RcCalibrationChecks::RcCalibrationChecks()
 -29.5%     -26 -29.5%     -26    RcCalibrationChecks::updateParams()
  -7.1%     -28  -7.1%     -28    rc_update::RCUpdate::updateParams()
  -2.3%     -32  -2.3%     -32    rc_update::RCUpdate::RCUpdate()
  -3.8%     -44  -3.8%     -44    rc_update::RCUpdate::Run()
  -2.0%     -68  -2.0%     -68    Commander::handle_command()
 -16.7%    -100 -16.7%    -100    RcCalibrationChecks::checkAndReport()
  -0.9%    -144  -0.9%    -144    px4::parameters
  -0.1%    -152  -0.1%    -152    g_cromfs_image
  -0.1%    -200  -0.1%    -200    [section .text]
-0.1% -28.1Ki  -0.0%    -880    TOTAL

Updated: 2025-10-14T05:26:57

@sfuhrer
Copy link
Contributor

sfuhrer commented Aug 29, 2025

Yes getting rid of some unnecessary params is always highly appreciated. I also never seen anybody touching them. The interesting dead-zones are the mode-dependent ones.
Docs that need to be updated:

And we'll probably need to update QGC.

dakejahl
dakejahl previously approved these changes Aug 29, 2025
Copy link
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.

Deleted params make me happy

this should be handled higher level.
Regular expression: RC.{0,2}_DZ
@MaEtUgR MaEtUgR force-pushed the maetugr/remove-rc-deadzone branch from b825a4e to b6d2fb4 Compare September 16, 2025 09:38
@MaEtUgR MaEtUgR marked this pull request as ready for review September 16, 2025 09:39
@PX4 PX4 deleted a comment from github-actions bot Sep 16, 2025
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Sep 16, 2025

Because of the positive feedback I went through the draft again to check for any remaining reference to these parameters and found:

It's in the separate commit for review convenience: b6d2fb4

So we should save even a bit more resources now. What's open is the check in QGC what implications it has.

@sfuhrer
Copy link
Contributor

sfuhrer commented Sep 16, 2025

Because of the positive feedback I went through the draft again to check for any remaining reference to these parameters and found:

* The docs mentioned in [rc_update: remove 1% deadzone for RC channels 1-8 #25502 (comment)](https://github.com/PX4/PX4-Autopilot/pull/25502#issuecomment-3236893087)

* The amov parameter dump which contains every single parameter that was in existence then

* The RC calibration check which only made sure the parameter value to be sane

It's in the separate commit for review convenience: b6d2fb4

Great, thanks, looks good.

What's open is the check in QGC what implications it has.

Let's do that then now!

dakejahl
dakejahl previously approved these changes Oct 14, 2025
Copy link

No flaws found

@dakejahl dakejahl merged commit 4842c54 into main Oct 14, 2025
71 of 72 checks passed
@dakejahl dakejahl deleted the maetugr/remove-rc-deadzone branch October 14, 2025 05:41
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.

4 participants