metadata: fix generic param metadata generation

Adds the module.yaml params that was previously split into a separate file.
This commit is contained in:
Beat Küng 2021-11-11 11:10:24 +01:00 committed by Daniel Agar
parent bcba3dfe52
commit 93a54ee63d
2 changed files with 15 additions and 6 deletions

View File

@ -45,14 +45,26 @@ add_custom_target(metadata_airframes
USES_TERMINAL
)
set(generated_params_dir ${PX4_BINARY_DIR}/generated_params_metadata)
file(GLOB_RECURSE yaml_config_files ${PX4_SOURCE_DIR}/src/modules/*.yaml
${PX4_SOURCE_DIR}/src/drivers/*.yaml ${PX4_SOURCE_DIR}/src/lib/*.yaml)
list(FILTER yaml_config_files EXCLUDE REGEX ".*/pwm_out_sim/") # avoid param duplicates
add_custom_target(metadata_parameters
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --ethernet --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
COMMAND ${CMAKE_COMMAND} -E make_directory ${generated_params_dir}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
--all-ports --ethernet --params-file ${generated_params_dir}/serial_params.c --config-files ${yaml_config_files}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/module_config/generate_params.py
--params-file ${generated_params_dir}/module_params.c
--timer-config ${PX4_SOURCE_DIR}/boards/px4/fmu-v5/src/timer_config.cpp # select a typical board
--board-with-io
--config-files ${yaml_config_files} #--verbose
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--markdown ${PX4_BINARY_DIR}/docs/parameters.md

3
src/.gitignore vendored
View File

@ -1,3 +0,0 @@
/generated_serial_params.c