Skip to content

feat(commander): add COM_PARA_ACT to configure parachute failsafe#26918

Open
gguidone wants to merge 1 commit intomainfrom
gg/parachute-action
Open

feat(commander): add COM_PARA_ACT to configure parachute failsafe#26918
gguidone wants to merge 1 commit intomainfrom
gg/parachute-action

Conversation

@gguidone
Copy link
Copy Markdown
Contributor

Solved Problem

Previously, the parachute health failsafe was hardcoded to RTL. This is too restrictive for certain mission profiles where a simple warning or an immediate landing is preferred.

Solution

Added COM_PARA_ACT to configure the failsafe response:

  • Warning (0)
  • Land (1)
  • RTL (2, Default)

The failsafe is ignored if the global parachute parameter (COM_PARACHUTE_EN) is disabled.

Test coverage

  • SITL: Verified all three COM_PARA_ACT behaviors trigger correctly upon failure injection.
  • SITL: Confirmed no action is taken when COM_PARACHUTE_EN is 0.

…ilsafe

Previously the parachute unhealthy failsafe was hardcoded to RTL.
@github-actions
Copy link
Copy Markdown

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 192 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +192  +0.0%    +192    .text
  +0.0%     +56  +0.0%     +56    g_cromfs_image
  [NEW]     +40  [NEW]     +40    Failsafe::fromParachuteActParam()
   +13%     +28   +13%     +28    ParachuteChecks::checkAndReport()
  +4.4%     +20  +4.4%     +20    Failsafe::Failsafe()
  +1.1%     +20  +1.1%     +20    HealthAndArmingChecks::HealthAndArmingChecks()
  +0.0%     +16  +0.0%     +16    [section .text]
  +3.4%     +12  +3.4%     +12    Commander::handleAutoDisarm()
  +5.3%     +12  +5.3%     +12    Failsafe::updateParamsImpl()
   +38%     +12   +38%     +12    ParachuteChecks::updateParamsImpl()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  +2.3%      +8  +2.3%      +8    Commander::~Commander()
  +0.0%      +8  +0.0%      +8    px4::parameters
  [NEW]      +4  [NEW]      +4    CSWTCH.827
  +0.7%      +4  +0.7%      +4    Commander::arm()
 -99.9%      +4 -99.9%      +4    [11 Others]
  [DEL]      -4  [DEL]      -4    CSWTCH.824
  -1.6%      -4  -1.6%      -4    Commander::checkForMissionUpdate()
  -0.3%      -4  -0.3%      -4    Commander::dataLinkCheck()
  -0.2%      -8  -0.2%      -8    Commander::handle_command()
  -6.7%     -12  -6.7%     -12    Commander::updateControlMode()
  -5.0%     -28  -5.0%     -28    Commander::control_status_leds()
+0.0%    +120  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_aranges
+0.0%     +44  [ = ]       0    .debug_frame
+0.0% +4.74Ki  [ = ]       0    .debug_info
+0.0%    +378  [ = ]       0    .debug_line
+0.0%    +422  [ = ]       0    .debug_loclists
+0.0%     +43  [ = ]       0    .debug_rnglists
  [DEL]      -3  [ = ]       0    [Unmapped]
  +0.0%     +46  [ = ]       0    [section .debug_rnglists]
+0.0% +1.05Ki  [ = ]       0    .debug_str
+0.8%      +2  [ = ]       0    .shstrtab
+0.0%     +38  [ = ]       0    .strtab
  [DEL]     -11  [ = ]       0    CSWTCH.824
  [NEW]     +11  [ = ]       0    CSWTCH.827
  [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
+0.0%     +32  [ = ]       0    .symtab
  [DEL]     -32  [ = ]       0    CSWTCH.824
  [NEW]     +32  [ = ]       0    CSWTCH.827
   +17%     +16  [ = ]       0    Commander::Commander()
 -50.0%     -16  [ = ]       0    Commander::checkForMissionUpdate()
  +100%     +16  [ = ]       0    Commander::checkWorkerThread()
 -25.0%     -16  [ = ]       0    Commander::control_status_leds()
  +100%     +16  [ = ]       0    Commander::updateControlMode()
 -33.3%     -16  [ = ]       0    Commander::updateTunes()
   +33%     +16  [ = ]       0    Failsafe::checkStateAndMode()
   +20%     +16  [ = ]       0    Failsafe::fromOffboardLossActParam()
  [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
 -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
  +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -0.3%     -32  [ = ]       0    [section .symtab]
  -1.5%     -16  [ = ]       0    uORB::Publication<>::publish()
   +14%     +16  [ = ]       0    uORB::SubscriptionData<>::SubscriptionData()
-1.9%    -192  [ = ]       0    [Unmapped]
+0.0% +6.86Ki  +0.0%    +192    TOTAL

px4_fmu-v6x [Total VM Diff: 184 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +184  +0.0%    +184    .text
  +0.0%     +48  +0.0%     +48    g_cromfs_image
  [NEW]     +40  [NEW]     +40    Failsafe::fromParachuteActParam()
   +13%     +28   +13%     +28    ParachuteChecks::checkAndReport()
  +4.4%     +20  +4.4%     +20    Failsafe::Failsafe()
  +1.1%     +20  +1.1%     +20    HealthAndArmingChecks::HealthAndArmingChecks()
  +0.0%     +16  +0.0%     +16    [section .text]
  +3.4%     +12  +3.4%     +12    Commander::handleAutoDisarm()
  +5.3%     +12  +5.3%     +12    Failsafe::updateParamsImpl()
   +38%     +12   +38%     +12    ParachuteChecks::updateParamsImpl()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  +2.3%      +8  +2.3%      +8    Commander::~Commander()
  +0.1%      +8  +0.1%      +8    px4::parameters
  [NEW]      +4  [NEW]      +4    CSWTCH.827
  +0.7%      +4  +0.7%      +4    Commander::arm()
 -99.9%      +4 -99.9%      +4    [9 Others]
  [DEL]      -4  [DEL]      -4    CSWTCH.824
  -1.6%      -4  -1.6%      -4    Commander::checkForMissionUpdate()
  -0.3%      -4  -0.3%      -4    Commander::dataLinkCheck()
  -0.2%      -8  -0.2%      -8    Commander::handle_command()
  -6.7%     -12  -6.7%     -12    Commander::updateControlMode()
  -5.0%     -28  -5.0%     -28    Commander::control_status_leds()
+0.0%    +120  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_aranges
+0.0%     +44  [ = ]       0    .debug_frame
+0.0% +4.68Ki  [ = ]       0    .debug_info
+0.0%    +378  [ = ]       0    .debug_line
   +25%      +1  [ = ]       0    [Unmapped]
  +0.0%    +377  [ = ]       0    [section .debug_line]
+0.0%    +372  [ = ]       0    .debug_loclists
+0.0%     +45  [ = ]       0    .debug_rnglists
 -50.0%      -1  [ = ]       0    [Unmapped]
  +0.0%     +46  [ = ]       0    [section .debug_rnglists]
+0.0% +1.07Ki  [ = ]       0    .debug_str
-0.8%      -2  [ = ]       0    .shstrtab
+0.0%     +38  [ = ]       0    .strtab
  [DEL]     -11  [ = ]       0    CSWTCH.824
  [NEW]     +11  [ = ]       0    CSWTCH.827
  [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
+0.0%     +32  [ = ]       0    .symtab
  [DEL]     -32  [ = ]       0    CSWTCH.824
  [NEW]     +32  [ = ]       0    CSWTCH.827
   +17%     +16  [ = ]       0    Commander::Commander()
 -50.0%     -16  [ = ]       0    Commander::checkForMissionUpdate()
  +100%     +16  [ = ]       0    Commander::checkWorkerThread()
 -25.0%     -16  [ = ]       0    Commander::control_status_leds()
  +100%     +16  [ = ]       0    Commander::updateControlMode()
 -33.3%     -16  [ = ]       0    Commander::updateTunes()
   +33%     +16  [ = ]       0    Failsafe::checkStateAndMode()
   +20%     +16  [ = ]       0    Failsafe::fromOffboardLossActParam()
  [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
 -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
  +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -0.3%     -32  [ = ]       0    [section .symtab]
  -1.5%     -16  [ = ]       0    uORB::Publication<>::publish()
   +14%     +16  [ = ]       0    uORB::SubscriptionData<>::SubscriptionData()
-4.1%    -184  [ = ]       0    [Unmapped]
+0.0% +6.75Ki  +0.0%    +184    TOTAL

Updated: 2026-03-31T16:04:18

Comment on lines 511 to +516
COM_PARACHUTE:
description:
short: Require MAVLink parachute system to be present and healthy
type: boolean
default: 0
COM_PARA_ACT:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now we have one parameter to enable parachute checking and one to select what to do. How about a disabled and a black arming option instead?

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.

2 participants