ROMFS: respect kconfig for including romfs files (airframes, etc) (#22571)

* ROMFS: respect kconfig for including romfs files (airframes, etc)

* ROMFS: only add R1 airframe with differential drive control

* ROMFS: adapt to differential drive module renaming

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
Daniel Agar 2024-02-23 09:40:00 -05:00 committed by GitHub
parent 37a40d3fc2
commit b2b7439060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 201 additions and 107 deletions

View File

@ -34,28 +34,79 @@
add_subdirectory(airframes) add_subdirectory(airframes)
px4_add_romfs_files( px4_add_romfs_files(
rc.airship_apps
rc.airship_defaults
rc.autostart_ext rc.autostart_ext
rc.balloon_apps
rc.balloon_defaults
rc.boat_defaults
rc.fw_apps
rc.fw_defaults
rc.heli_defaults
rc.logging
rc.mc_apps
rc.mc_defaults
rcS rcS
rc.sensors rc.sensors
rc.thermal_cal rc.vehicle_setup
# TODO
rc.balloon_apps
rc.balloon_defaults
)
if(CONFIG_MODULES_AIRSHIP_ATT_CONTROL)
px4_add_romfs_files(
rc.airship_apps
rc.airship_defaults
)
endif()
if(CONFIG_MODULES_FW_RATE_CONTROL)
px4_add_romfs_files(
rc.fw_apps
rc.fw_defaults
)
endif()
if(CONFIG_MODULES_MC_RATE_CONTROL)
px4_add_romfs_files(
rc.heli_defaults
rc.mc_apps
rc.mc_defaults
)
endif()
if(CONFIG_MODULES_ROVER_POS_CONTROL)
px4_add_romfs_files(
rc.rover_apps rc.rover_apps
rc.rover_defaults rc.rover_defaults
rc.boat_defaults # hack
)
endif()
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
px4_add_romfs_files(
rc.rover_differential_apps rc.rover_differential_apps
rc.rover_differential_defaults rc.rover_differential_defaults
)
endif()
if(CONFIG_MODULES_UUV_ATT_CONTROL)
px4_add_romfs_files(
rc.uuv_apps rc.uuv_apps
rc.uuv_defaults rc.uuv_defaults
rc.vehicle_setup )
endif()
if(CONFIG_MODULES_VTOL_ATT_CONTROL)
px4_add_romfs_files(
rc.vtol_apps rc.vtol_apps
rc.vtol_defaults rc.vtol_defaults
) )
endif()
if(CONFIG_MODULES_LOGGER)
px4_add_romfs_files(
rc.logging
)
endif()
if(CONFIG_MODULES_TEMPERATURE_COMPENSATION)
px4_add_romfs_files(
rc.thermal_cal
)
endif()

View File

@ -32,25 +32,28 @@
############################################################################ ############################################################################
px4_add_romfs_files( px4_add_romfs_files(
# [0-999] Reserved (historical)" # [0-999] Reserved (historical)
# [1000, 1999] Simulation setups" # [18000, 18999] High-altitude balloons
18001_TF-B1
# [22000, 22999] Reserve for custom models
)
if(CONFIG_MODULES_SIMULATION_PWM_OUT_SIM)
px4_add_romfs_files(
# [1000, 1999] Simulation setups
1001_rc_quad_x.hil 1001_rc_quad_x.hil
1002_standard_vtol.hil 1002_standard_vtol.hil
1100_rc_quad_x_sih.hil 1100_rc_quad_x_sih.hil
1101_rc_plane_sih.hil 1101_rc_plane_sih.hil
1102_tailsitter_duo_sih.hil 1102_tailsitter_duo_sih.hil
)
endif()
# [2000, 2999] Standard planes" if(CONFIG_MODULES_MC_RATE_CONTROL)
2100_standard_plane px4_add_romfs_files(
2106_albatross # [4000, 4999] Quadrotor x
2507_cloudship
# [3000, 3999] Flying wing"
3000_generic_wing
# [4000, 4999] Quadrotor x"
4001_quad_x 4001_quad_x
4014_s500 4014_s500
4015_holybro_s500 4015_holybro_s500
@ -68,20 +71,20 @@ px4_add_romfs_files(
4500_clover4 4500_clover4
4901_crazyflie21 4901_crazyflie21
# [5000, 5999] Quadrotor +" # [5000, 5999] Quadrotor +
5001_quad_+ 5001_quad_+
# [6000, 6999] Hexarotor x" # [6000, 6999] Hexarotor x
6001_hexa_x 6001_hexa_x
6002_draco_r 6002_draco_r
# [7000, 7999] Hexarotor +" # [7000, 7999] Hexarotor +
7001_hexa_+ 7001_hexa_+
# [8000, 8999] Octorotor +" # [8000, 8999] Octorotor +
8001_octo_x 8001_octo_x
# [9000, 9999] Octorotor +" # [9000, 9999] Octorotor +
9001_octo_+ 9001_octo_+
# [11000, 11999] Hexa Cox # [11000, 11999] Hexa Cox
@ -90,6 +93,38 @@ px4_add_romfs_files(
# [12000, 12999] Octo Cox # [12000, 12999] Octo Cox
12001_octo_cox 12001_octo_cox
# [14000, 14999] MC with tilt
14001_generic_mc_with_tilt
16001_helicopter
24001_dodeca_cox
)
endif()
if(CONFIG_MODULES_FW_RATE_CONTROL)
px4_add_romfs_files(
# [2000, 2999] Standard planes
2100_standard_plane
2106_albatross
# [3000, 3999] Flying wing
3000_generic_wing
# [17000, 17999] Autogyro
17002_TF-AutoG2
17003_TF-G2
)
endif()
if(CONFIG_MODULES_AIRSHIP_ATT_CONTROL)
px4_add_romfs_files(
2507_cloudship
)
endif()
if(CONFIG_MODULES_VTOL_ATT_CONTROL)
px4_add_romfs_files(
# [13000, 13999] VTOL # [13000, 13999] VTOL
13000_generic_vtol_standard 13000_generic_vtol_standard
13100_generic_vtol_tiltrotor 13100_generic_vtol_tiltrotor
@ -97,29 +132,27 @@ px4_add_romfs_files(
13014_vtol_babyshark 13014_vtol_babyshark
13030_generic_vtol_quad_tiltrotor 13030_generic_vtol_quad_tiltrotor
13200_generic_vtol_tailsitter 13200_generic_vtol_tailsitter
)
endif()
# [14000, 14999] MC with tilt if(CONFIG_MODULES_ROVER_POS_CONTROL)
14001_generic_mc_with_tilt px4_add_romfs_files(
16001_helicopter
# [17000, 17999] Autogyro
17002_TF-AutoG2
17003_TF-G2
# [18000, 18999] High-altitude balloons
18001_TF-B1
# [22000, 22999] Reserve for custom models
24001_dodeca_cox
50000_generic_ground_vehicle 50000_generic_ground_vehicle
50004_nxpcup_car_dfrobot_gpx 50004_nxpcup_car_dfrobot_gpx
50003_aion_robotics_r1_rover )
endif()
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
px4_add_romfs_files(
50003_aion_robotics_r1_rover
)
endif()
if(CONFIG_MODULES_UUV_ATT_CONTROL)
px4_add_romfs_files(
# [60000, 61000] (Unmanned) Underwater Robots # [60000, 61000] (Unmanned) Underwater Robots
60000_uuv_generic 60000_uuv_generic
60001_uuv_hippocampus 60001_uuv_hippocampus
60002_uuv_bluerov2_heavy 60002_uuv_bluerov2_heavy
) )
endif()

View File

@ -439,7 +439,12 @@ else
# #
# Start a thermal calibration if required. # Start a thermal calibration if required.
# #
. ${R}etc/init.d/rc.thermal_cal set RC_THERMAL_CAL ${R}etc/init.d/rc.thermal_cal
if [ -f ${RC_THERMAL_CAL} ]
then
. ${RC_THERMAL_CAL}
fi
unset RC_THERMAL_CAL
# #
# Start gimbal to control mounts such as gimbals, disabled by default. # Start gimbal to control mounts such as gimbals, disabled by default.
@ -500,7 +505,12 @@ else
# #
# Start the logger. # Start the logger.
# #
. ${R}etc/init.d/rc.logging set RC_LOGGING ${R}etc/init.d/rc.logging
if [ -f ${RC_LOGGING} ]
then
. ${RC_LOGGING}
fi
unset RC_LOGGING
# #
# Set additional parameters and env variables for selected AUTOSTART. # Set additional parameters and env variables for selected AUTOSTART.