PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Added a VOXL 2 board specific shutdown hook to run on exit

Open katzfey opened this issue 1 year ago • 1 comments

Solved Problem

If the apps processor side of PX4 running on VOXL 2 exits the DSP side continues on. If PX4 is then restarted it will fail because the DSP side will still be running the old instance. This PR will send a new custom kill command to the DSP to reset it and get it back into it's ready state. This is done within a shutdown hook that's installed on px4 start up.

katzfey avatar May 13 '24 21:05 katzfey

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-may-15-2024/38773/1

DronecodeBot avatar May 15 '24 15:05 DronecodeBot

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 56 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +48  +0.0%     +48    .text
  +8.6%     +48  +8.6%     +48    ../../platforms/common/shutdown.cpp
[ = ]       0  +0.0%      +8    .bss
  [ = ]       0   +17%      +8    ../../platforms/common/shutdown.cpp
-0.0%     -19  [ = ]       0    .debug_abbrev
  -6.6%     -75  [ = ]       0    ../../platforms/common/shutdown.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
-0.0%     -92  [ = ]       0    .debug_info
  -1.1%     -88  [ = ]       0    ../../platforms/common/shutdown.cpp
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
+0.0%     +15  [ = ]       0    .debug_line
  +2.6%     +43  [ = ]       0    ../../platforms/common/shutdown.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  -0.3%      -3  [ = ]       0    task/task_cancelpt.c
+0.0%     +83  [ = ]       0    .debug_loc
   +14%     +83  [ = ]       0    ../../platforms/common/shutdown.cpp
-0.0%     -39  [ = ]       0    .debug_ranges
 -20.0%     -32  [ = ]       0    ../../platforms/common/shutdown.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +1.5%      +1  [ = ]       0    task/task_cancelpt.c
-1.0%      -2  [ = ]       0    .shstrtab
+0.0%     +22  [ = ]       0    .strtab
  +7.9%     +22  [ = ]       0    ../../platforms/common/shutdown.cpp
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +0.0%     +32  [ = ]       0    [section .strtab]
+0.0%     +32  [ = ]       0    .symtab
  +6.5%     +32  [ = ]       0    ../../platforms/common/shutdown.cpp
  -7.0%     -64  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +16  [ = ]       0    ../../src/modules/fw_pos_control/FixedwingPositionControl.cpp
  +0.1%     +48  [ = ]       0    [section .symtab]
-0.3%     -48  [ = ]       0    [Unmapped]
-0.0%      -8  +0.0%     +56    TOTAL

px4_fmu-v6x [Total VM Diff: 72 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +64  +0.0%     +64    .text
  +8.6%     +48  +8.6%     +48    ../../platforms/common/shutdown.cpp
  +0.0%     +13  +0.0%     +13    [section .text]
  +0.2%      +3  +0.2%      +3    ../../src/systemcmds/ver/ver.cpp
[ = ]       0  +0.0%      +8    .bss
  [ = ]       0   +17%      +8    ../../platforms/common/shutdown.cpp
-0.0%     -19  [ = ]       0    .debug_abbrev
  -6.6%     -75  [ = ]       0    ../../platforms/common/shutdown.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
-0.0%     -92  [ = ]       0    .debug_info
  -1.1%     -88  [ = ]       0    ../../platforms/common/shutdown.cpp
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
+0.0%     +15  [ = ]       0    .debug_line
  +2.6%     +43  [ = ]       0    ../../platforms/common/shutdown.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  -0.3%      -3  [ = ]       0    task/task_cancelpt.c
+0.0%     +83  [ = ]       0    .debug_loc
   +14%     +83  [ = ]       0    ../../platforms/common/shutdown.cpp
-0.0%     -39  [ = ]       0    .debug_ranges
 -20.0%     -32  [ = ]       0    ../../platforms/common/shutdown.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +1.5%      +1  [ = ]       0    task/task_cancelpt.c
-0.9%      -2  [ = ]       0    .shstrtab
+0.0%     +22  [ = ]       0    .strtab
  +7.9%     +22  [ = ]       0    ../../platforms/common/shutdown.cpp
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +0.0%     +32  [ = ]       0    [section .strtab]
+0.0%     +32  [ = ]       0    .symtab
  +6.5%     +32  [ = ]       0    ../../platforms/common/shutdown.cpp
  -7.0%     -64  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +16  [ = ]       0    ../../src/modules/fw_pos_control/FixedwingPositionControl.cpp
  +0.1%     +48  [ = ]       0    [section .symtab]
-0.1%     -64  [ = ]       0    [Unmapped]
-0.0%      -8  +0.0%     +72    TOTAL

Updated: 2025-03-31T16:46:05

github-actions[bot] avatar Feb 10 '25 00:02 github-actions[bot]