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:
Beat Küng
2021-02-09 09:44:50 +01:00
parent 9f00fd2796
commit 1f8e7de824
10 changed files with 279 additions and 3 deletions
+2 -1
View File
@@ -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`
+3 -1
View File
@@ -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)