[modules][ocaml] implement module dependency (#2669)

- support depends, conflicts and provides nodes, all under a 'dep' node
- autoload are kept for now and are not moved yet
- modules are updated for new dep format
- it is now required that module's name and filename are the same
This commit is contained in:
Gautier Hattenberger
2021-03-16 17:47:34 +01:00
committed by GitHub
parent 97fa1d73ac
commit e4d9e10492
149 changed files with 589 additions and 284 deletions

View File

@@ -55,9 +55,9 @@
</module>
<!--configure name="SDLOG_USE_RTC" value="FALSE"/-->
<module name="tlsf"/>
<!--module name="tlsf"/>
<module name="pprzlog"/>
<module name="logger" type="sd_chibios"/>
<module name="logger" type="sd_chibios"/-->
<module name="flight_recorder"/>
</firmware>
@@ -216,7 +216,7 @@
<section name="SIMULATOR" prefix="NPS_">
<define name="JSBSIM_LAUNCHSPEED" value="15"/>
<define name="JSBSIM_MODEL" value="easystar" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_wind_estimator.h" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_default.h" type="string"/>
<define name="JS_AXIS_MODE" value="4"/>
</section>

View File

@@ -37,7 +37,9 @@
</dl_settings>
</settings>
<depends>pwm_meas</depends>
<dep>
<depends>pwm_meas</depends>
</dep>
<header>
<file name="aoa_pwm.h" />
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ahrs_flat_cmpl_rmat" dir="ahrs">
<module name="ahrs_float_cmpl_rmat" dir="ahrs">
<doc>
<description>
AHRS using complementary filter in floating point.

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ahrs_float_dcm" dir="ahrs">
<module name="ahrs_float_invariant" dir="ahrs">
<doc>
<description>
AHRS using invariant filter.

View File

@@ -10,7 +10,9 @@
- ADC channels can be used for gyros.
</description>
</doc>
<depends>infrared_adc</depends>
<dep>
<depends>infrared_adc</depends>
</dep>
<header>
<file name="ahrs_infrared.h"/>
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="auto1_cmd" dir="switching">
<module name="auto1_commands" dir="switching">
<doc>
<description>AUTO1 FLAPS/HATCH COMMANDS.
Enable RC controlled HATCH and BRAKE/FLAPS in both MANUAL and AUTO1, while automatic in AUTO2.

View File

@@ -7,6 +7,9 @@
<header>
<file name="baro_MS5534A.h"/>
</header>
<dep>
<depends>spi_master</depends>
</dep>
<init fun="baro_MS5534A_init()"/>
<periodic fun="baro_MS5534A_send()" freq="20"/>
<event fun="baro_MS5534A_event()"/>
@@ -14,7 +17,6 @@
<file name="baro_MS5534A.c"/>
<define name="USE_BARO_MS5534A"/>
<define name="USE_SPI_SLAVE0"/>
<define name="SPI_MASTER"/>
<configure name="BARO_MS5534A_W1" value="0xAC20"/>
<configure name="BARO_MS5534A_W2" value="0x87D9"/>
<configure name="BARO_MS5534A_W3" value="0x8D9C"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_bmp280" dir="sensors">
<module name="baro_bmp280_i2c" dir="sensors">
<doc>
<description>
Bosch-Sensortech BMP280xx pressure sensor

View File

@@ -10,6 +10,9 @@
<configure name="MS5611_SLAVE_IDX" value="SPI_SLAVE0" description="SPI slave select index"/>
<define name="SENSOR_SYNC_SEND" description="flag to enable sending BARO_MS5611 message on every new measurement"/>
</doc>
<dep>
<depends>spi_master</depends>
</dep>
<header>
<file name="baro_ms5611_spi.h"/>
</header>
@@ -20,9 +23,6 @@
<makefile target="ap">
<configure name="MS5611_SPI_DEV" default="spi1" case="upper|lower"/>
<configure name="MS5611_SLAVE_IDX" default="spi_slave0" case="upper|lower"/>
<raw>
include $(CFG_SHARED)/spi_master.makefile
</raw>
<define name="USE_$(MS5611_SPI_DEV_UPPER)" />
<define name="USE_$(MS5611_SLAVE_IDX_UPPER)" />
<define name="MS5611_SPI_DEV" value="$(MS5611_SPI_DEV_LOWER)" />

View File

@@ -8,13 +8,14 @@
<header>
<file name="baro_scp.h"/>
</header>
<dep>
<depends>spi_master</depends>
</dep>
<init fun="baro_scp_init()"/>
<periodic fun="baro_scp_periodic()" freq="1.8"/>
<event fun="baro_scp_event()"/>
<makefile target="ap">
<file name="baro_scp.c"/>
<define name="SPI_MASTER"/>
<define name="USE_SPI"/>
</makefile>
</module>

View File

@@ -53,7 +53,9 @@
</dl_settings>
</settings>
<autoload name="video_thread"/>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="mt9v117.h"/>

View File

@@ -12,10 +12,10 @@
Normal up of the board is on STM32F405 side.
</description>
</doc>
<dep>
<depends>spi_master,osd_max7456,baro_bmp280_i2c</depends>
</dep>
<autoload name="imu" type="mpu6000"/>
<autoload name="spi" type="master"/>
<autoload name="osd_max7456" />
<autoload name="baro_bmp280_i2c" />
<makefile target="!sim|nps|fbw">
<!-- IMU CONFIGURATION -->

View File

@@ -13,11 +13,10 @@
</description>
<configure name="BOARD_MATEK_ROTATED" value="FALSE|TRUE" description="if TRUE, the board is not using is default orientation and axis can be redefined by hand"/>
</doc>
<dep>
<depends>spi_master,osd_max7456,baro_bmp280_i2c,current_sensor</depends>
</dep>
<autoload name="imu" type="mpu6000"/>
<autoload name="spi" type="master"/>
<autoload name="osd_max7456"/>
<autoload name="baro_bmp280_i2c"/>
<autoload name="current_sensor"/>
<makefile target="!sim|nps|fbw">
<!-- IMU CONFIGURATION -->

View File

@@ -12,9 +12,10 @@
</description>
<configure name="BOARD_TAWAKI_ROTATED" value="FALSE|TRUE" description="if TRUE, the board is not using is default orientation and axis can be redefined by hand"/>
</doc>
<dep>
<depends>baro_bmp3,mag_lis3mdl</depends>
</dep>
<autoload name="imu" type="mpu6000"/>
<autoload name="baro" type="bmp3"/>
<autoload name="mag" type="lis3mdl"/>
<makefile target="!sim|nps|fbw">
<define name="IMU_MPU_GYRO_RANGE" value="MPU60X0_GYRO_RANGE_1000"/>
<define name="IMU_MPU_ACCEL_RANGE" value="MPU60X0_ACCEL_RANGE_8G"/>

View File

@@ -4,7 +4,9 @@
<doc>
<description>Camera control to point a segment</description>
</doc>
<depends>cam_point</depends>
<dep>
<depends>cam_point</depends>
</dep>
<header>
<file name="cam_segment.h"/>
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="config">
<module name="configure_actuators_mkk_v2" dir="config">
<doc>
<description>Configure Mikrokopter MKK v2.0 BLDC motor controllers (requires subsystem actuators_mkk_v2)</description>
</doc>

View File

@@ -9,7 +9,8 @@
- guidance_basic_fw
</description>
</doc>
<autoload name="stabilization_attitude_fw"/>
<autoload name="guidance_basic_fw"/>
<dep>
<depends>stabilization_attitude_fw,guidance_basic_fw</depends>
</dep>
<makefile target="ap|sim|nps" firmware="fixedwing"/>
</module>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="control" dir="control">
<module name="control_adaptive" dir="control">
<doc>
<description>
Adaptive control for fixed-wing aircraft.
@@ -9,7 +9,8 @@
- guidance_basic_fw
</description>
</doc>
<autoload name="stabilization_adaptive_fw"/>
<autoload name="guidance_basic_fw"/>
<dep>
<depends>stabilization_adaptive_fw,guidance_basic_fw</depends>
</dep>
<makefile target="ap|sim|nps" firmware="fixedwing"/>
</module>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="control" dir="control">
<module name="control_energy" dir="control">
<doc>
<description>
Energy control for fixed-wing aircraft.
@@ -9,7 +9,8 @@
- guidance_energy
</description>
</doc>
<autoload name="stabilization_attitude_fw"/>
<autoload name="guidance_energy"/>
<dep>
<depends>stabilization_attitude_fw,guidance_energy</depends>
</dep>
<makefile target="ap|sim|nps" firmware="fixedwing"/>
</module>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="control" dir="control">
<module name="control_energyadaptive" dir="control">
<doc>
<description>
Energy control for fixed-wing aircraft with adaptive stabilization.
@@ -9,7 +9,8 @@
- guidance_energy
</description>
</doc>
<autoload name="stabilization_adaptive_fw"/>
<autoload name="guidance_energy"/>
<dep>
<depends>stabilization_adaptive_fw,guidance_energy</depends>
</dep>
<makefile target="ap|sim|nps" firmware="fixedwing"/>
</module>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="control" dir="control">
<module name="control_new" dir="control">
<doc>
<description>
Full PID control for fixed-wing aircraft.
@@ -9,7 +9,8 @@
- guidance_full_pid_fw
</description>
</doc>
<autoload name="stabilization_adaptive_fw"/>
<autoload name="guidance_full_pid_fw"/>
<dep>
<depends>stabilization_adaptive_fw,guidance_full_pid_fw</depends>
</dep>
<makefile target="ap|sim|nps" firmware="fixedwing"/>
</module>

View File

@@ -24,7 +24,9 @@
</doc>
<depends>extra_dl</depends>
<dep>
<depends>extra_dl</depends>
</dep>
<header>
<file name="copilot.h"/>
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ctrl_module_demo" dir="ctrl">
<module name="ctrl_module_innerloop_demo" dir="ctrl">
<doc>
<description>
Demo Control Module.

View File

@@ -32,7 +32,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="cv_blob_locator.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ColorFilter" dir="computer_vision">
<module name="cv_colorfilter" dir="computer_vision">
<doc>
<description>ColorFilter</description>
<define name="COLORFILTER_CAMERA" value="front_camera|bottom_camera" description="Video device to use"/>
@@ -20,7 +20,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="colorfilter.h"/>

View File

@@ -48,7 +48,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="cv_detect_color_object.h"/>

View File

@@ -61,7 +61,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="detect_gate.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="detect_window" dir="computer_vision">
<module name="cv_detect_window" dir="computer_vision">
<doc>
<description>
Detect window

View File

@@ -180,9 +180,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<autoload name="agl_dist"/>
<autoload name="pose_history"/>
<dep>
<depends>video_thread,agl_dist,pose_history</depends>
</dep>
<header>
<file name="opticflow_module.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="qrcode" dir="computer_vision/qrcode">
<module name="cv_qrcode" dir="computer_vision/qrcode">
<doc>
<description>
QR code reader using ZBAR library
@@ -10,9 +10,11 @@
<define name="QRCODE_CAMERA" value="front_camera|bottom_camera" description="The V4L2 camera device that is used for searching a QR code"/>
<define name="QRCODE_FPS" value="0" description="The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate"/>
<define name="QRCODE_DRAW_RECTANGLE" value="TRUE|FALSE" description="Whether or not to draw a rectangle around a found QR code"/>
</doc>
</doc>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="qr_code.h"/>

View File

@@ -32,7 +32,9 @@
</dl_settings>
</settings>
<depends>video_thread</depends>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="undistort_image.h"/>

View File

@@ -41,7 +41,9 @@
</dl_settings>
</dl_settings>
</settings>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2co,digital_cam_i2c,digital_cam_video</conflicts>
<dep>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2co,digital_cam_i2c,digital_cam_video</conflicts>
</dep>
<header>
<file name="dc_ctrl_parrot_mykonos.h"/>
<file name="dc.h"/>

View File

@@ -51,7 +51,9 @@
</dl_settings>
</settings>
<conflicts>digital_cam_i2c,digital_cam_servo,digital_cam_uart,digital_cam_video</conflicts>
<dep>
<conflicts>digital_cam_i2c,digital_cam_servo,digital_cam_uart,digital_cam_video</conflicts>
</dep>
<header>
<file name="gpio_cam_ctrl.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="atmega_i2c_cam_ctrl" dir="digital_cam">
<module name="digital_cam_i2c" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using a I2C channel)
@@ -14,7 +14,9 @@
<define name="DC_SHOOT_ON_BUTTON_RELEASE" />
<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
</doc>
<conflicts>digital_cam,digital_cam_servo,digital_cam_uart,digital_cam_video</conflicts>
<dep>
<conflicts>digital_cam,digital_cam_servo,digital_cam_uart,digital_cam_video</conflicts>
</dep>
<header>
<file name="atmega_i2c_cam_ctrl.h"/>
<file name="dc.h"/>

View File

@@ -17,7 +17,9 @@
<define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" description="grid in meters"/>
</doc>
<conflicts>digital_cam,digital_cam_i2c,digital_cam_uart,digital_cam_video</conflicts>
<dep>
<conflicts>digital_cam,digital_cam_i2c,digital_cam_uart,digital_cam_video</conflicts>
</dep>
<header>
<file name="servo_cam_ctrl.h"/>

View File

@@ -11,7 +11,9 @@
</description>
<define name="DC_RADIO_SHOOT" value="RADIO_xxx" description="specifies the channel to be used to trigger the camera by radio transmiter"/>
</doc>
<depends>digital_cam|digital_cam_servo|digital_cam_uart|digital_cam_i2c|digital_cam_video</depends>
<dep>
<depends>digital_cam|digital_cam_servo|digital_cam_uart|digital_cam_i2c|digital_cam_video</depends>
</dep>
<header>
<file name="dc_shoot_rc.h"/>
</header>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="uart_cam_ctrl" dir="digital_cam">
<module name="digital_cam_uart" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using a UART link)
@@ -53,7 +53,9 @@
</dl_settings>
</dl_settings>
</settings>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c</conflicts>
<dep>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c</conflicts>
</dep>
<header>
<file name="uart_cam_ctrl.h"/>
<file name="dc.h"/>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="video_cam_ctrl" dir="digital_cam">
<module name="digital_cam_video" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using embedded video)
@@ -34,9 +34,10 @@
</dl_settings>
</settings>
<depends>video_capture</depends>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c,digital_cam_uart</conflicts>
<dep>
<depends>video_capture</depends>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c,digital_cam_uart</conflicts>
</dep>
<header>
<file name="video_cam_ctrl.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="loggers">
<module name="direct_memory_logger" dir="loggers">
<doc>
<description>
Directly log values to memory for flash chips.
@@ -18,6 +18,9 @@
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>spi_master</depends>
</dep>
<header>
<file name="direct_memory_logger.h"/>
@@ -30,9 +33,6 @@
<configure name="DM_LOG_UART" default="uart1" case="upper|lower"/>
<configure name="DM_LOG_SPI_DEV" default="spi2" case="upper|lower"/>
<configure name="DM_LOG_SPI_SLAVE_IDX" default="spi_slave1" case="upper|lower"/>
<raw>
include $(CFG_SHARED)/spi_master.makefile
</raw>
<define name="USE_$(DM_LOG_SPI_DEV_UPPER)" value="1" />
<define name="USE_$(DM_LOG_SPI_SLAVE_IDX_UPPER)" value="1" />

View File

@@ -27,7 +27,9 @@
</dl_settings>
</settings>
<depends>gvf_module.xml</depends>
<dep>
<depends>gvf_module</depends>
</dep>
<header>
<file name="dcf.h"/>

View File

@@ -11,6 +11,10 @@
<configure name="FLIGHTRECORDER_SDLOG" value="TRUE|FALSE" description="Enable/disable logging on internal SD card (default=TRUE)"/>
<define name="FLIGHTRECORDER_DEVICE" value="dev" description="Device to be used when not internal SD card (ex: uart0)"/>
</doc>
<dep>
<depends>logger_sd_chibios,pprzlog</depends>
<provides>flight_recorder</provides>
</dep>
<header>
<file name="flight_recorder.h"/>
</header>

View File

@@ -12,7 +12,9 @@
<define name="FOLLOW_OFFSET_Y" value="0" description="the y offset in ENU (meters) from the plane"/>
<define name="FOLLOW_OFFSET_Z" value="0" description="the z offset in ENU (meters) from the plane"/>
</doc>
<depends>traffic_info</depends>
<dep>
<depends>traffic_info</depends>
</dep>
<header>
<file name="follow.h"/>
</header>

View File

@@ -16,7 +16,9 @@
</dl_settings>
</dl_settings>
</settings>
<depends>traffic_info</depends>
<dep>
<depends>traffic_info</depends>
</dep>
<header>
<file name="formation.h"/>
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gas_engine">
<module name="gas_engine_idle" dir="gas_engine">
<doc>
<description>Gas Engine Idle</description>
</doc>

View File

@@ -14,7 +14,9 @@ always blocking).
<define name="GPIO_EXT_PCA95XX_I2C_ADDRESSx" value="0x82" description="I2C address of GPIO expander"/>
<define name="GPIO_EXT_PCA95XX_BLOCKINGx" value="TRUE|FALSE" description="Whether write operations to this port should be blocking. (Note: reading is always blocking)."/>
</doc>
<autoload name="gpio_ext_common"/>
<dep>
<depends>gpio_ext_common</depends>
</dep>
<header>
<file name="gpio_ext_pca95xx.h"/>
</header>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_mediatek" dir="gps">
<module name="gps_mediatek_diy" dir="gps">
<doc>
<description>
Mediatek MT3329 GPS (UART)

View File

@@ -9,7 +9,9 @@
<configure name="GPS_UBX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c1)"/>
</doc>
<depends>gps_ublox</depends>
<dep>
<depends>gps_ublox</depends>
</dep>
<autoload name="gps_ublox"/>
<header>
<file name="gps_ubx_i2c.h"/>

View File

@@ -33,7 +33,9 @@ Warning: you still need to tell the driver, which paparazzi port you use.
</dl_settings>
</settings>
<depends>gps_ublox</depends>
<dep>
<depends>gps_ublox</depends>
</dep>
<header>
<file name="gps_ubx_ucenter.h"/>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="guidance_basic" dir="guidance">
<module name="guidance_basic_fw" dir="guidance">
<doc>
<description>
Legacy vertical control for fixedwing aircraft based on throttle (default) or pitch

View File

@@ -1,6 +1,6 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="guidance_full_pid" dir="guidance">
<module name="guidance_full_pid_fw" dir="guidance">
<doc>
<description>
Vertical control for fixedwing aircraft based on PID

Some files were not shown because too many files have changed in this diff Show More