mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 03:33:33 +08:00
mavlink: implement COMPONENT_INFORMATION
- implement COMP_METADATA_TYPE_VERSION & add component_version.json.gz to ROMFS for all targets. - implement COMP_METADATA_TYPE_PARAMETER (only enabled for SITL currently)
This commit is contained in:
@@ -59,7 +59,8 @@ add_custom_target(metadata_parameters
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--json ${PX4_BINARY_DIR}/docs/parameters.json
|
||||
--json ${PX4_BINARY_DIR}/docs/params.json
|
||||
--compress
|
||||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
|
||||
@@ -209,12 +209,14 @@ function(px4_add_board)
|
||||
endif()
|
||||
foreach(metadata ${EMBEDDED_METADATA})
|
||||
if(${metadata} STREQUAL "parameters")
|
||||
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/parameters.json.gz)
|
||||
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/params.json.gz)
|
||||
list(APPEND romfs_extra_dependencies parameters_xml)
|
||||
else()
|
||||
message(FATAL_ERROR "invalid value for EMBEDDED_METADATA: ${metadata}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/component_version.json.gz)
|
||||
list(APPEND romfs_extra_dependencies component_version_json)
|
||||
set(config_romfs_extra_files ${romfs_extra_files} CACHE INTERNAL "extra ROMFS files" FORCE)
|
||||
set(config_romfs_extra_dependencies ${romfs_extra_dependencies} CACHE INTERNAL "extra ROMFS deps" FORCE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user