diff --git a/Makefile b/Makefile index 105473f45a..6038d225ea 100644 --- a/Makefile +++ b/Makefile @@ -548,7 +548,8 @@ validate_module_configs: -not -path "$(SRC_DIR)/src/modules/zenoh/zenoh-pico/*" \ -not -path "$(SRC_DIR)/src/lib/events/libevents/*" \ -not -path "$(SRC_DIR)/src/lib/cdrstream/*" \ - -not -path "$(SRC_DIR)/src/lib/crypto/libtommath/*" -print0 | \ + -not -path "$(SRC_DIR)/src/lib/crypto/libtommath/*" \ + -not -path "$(SRC_DIR)/src/lib/tensorflow_lite_micro/*" -print0 | \ xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml # Cleanup diff --git a/src/lib/parameters/CMakeLists.txt b/src/lib/parameters/CMakeLists.txt index cfa118b2dd..07707a1549 100644 --- a/src/lib/parameters/CMakeLists.txt +++ b/src/lib/parameters/CMakeLists.txt @@ -37,21 +37,9 @@ if (NOT PARAM_DEFAULT_OVERRIDES) set(PARAM_DEFAULT_OVERRIDES "{}") endif() -# get full path for each module -get_property(module_list GLOBAL PROPERTY PX4_MODULE_PATHS) get_property(module_config_files GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES) if(DISABLE_PARAMS_MODULE_SCOPING) - # search all directories with .c files (potentially containing parameters) - file(GLOB_RECURSE c_files - ${PX4_SOURCE_DIR}/src/*.c - ${external_module_paths} - ) - foreach(file_path ${c_files}) - get_filename_component(dir_path ${file_path} PATH) - list(APPEND module_list "${dir_path}") - endforeach() - # search for all module configs as well file(GLOB_RECURSE yaml_files ${PX4_SOURCE_DIR}/src/*.yaml @@ -72,12 +60,8 @@ if(DISABLE_PARAMS_MODULE_SCOPING) endforeach() list(REMOVE_DUPLICATES module_config_files) -else() - list(APPEND module_list ${external_module_paths}) endif() -list(REMOVE_DUPLICATES module_list) - set(generated_params_dir ${PX4_BINARY_DIR}/generated_params) set(generated_serial_params_file ${generated_params_dir}/serial_params.c) set(generated_module_params_file ${generated_params_dir}/module_params.c) @@ -116,10 +100,9 @@ add_custom_command(OUTPUT ${generated_serial_params_file} ${generated_module_par set(parameters_xml ${PX4_BINARY_DIR}/parameters.xml) set(parameters_json ${PX4_BINARY_DIR}/parameters.json) -file(GLOB_RECURSE param_src_files ${PX4_SOURCE_DIR}/src/*params.c ${PX4_SOURCE_DIR}/src/*parameters.c) add_custom_command(OUTPUT ${parameters_xml} ${parameters_json} ${parameters_json}.xz COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/px_process_params.py - --src-path ${module_list} ${generated_params_dir} + --src-path ${generated_params_dir} --xml ${parameters_xml} --json ${parameters_json} --compress @@ -132,7 +115,6 @@ add_custom_command(OUTPUT ${parameters_xml} ${parameters_json} ${parameters_json --skip-if-no-schema # mavlink submodule might not exist for current target if built in CI #--verbose DEPENDS - ${param_src_files} ${generated_serial_params_file} ${generated_module_params_file} px4params/srcparser.py diff --git a/validation/module_schema.yaml b/validation/module_schema.yaml index 9af7de8234..7af7253200 100644 --- a/validation/module_schema.yaml +++ b/validation/module_schema.yaml @@ -155,7 +155,8 @@ parameters: 'm/s^3/sqrt(Hz)', 'm/s/sqrt(Hz)', 's/(1000*PWM)', '%m/s', 'min', 'us/C', 'N/(m/s)', 'Nm/(rad/s)', 'Nm', 'N', 'rpm', - 'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD', 'dBHz'] + 'normalized_thrust/s', 'normalized_thrust', 'norm', 'SD', 'dBHz', + '1/s/sqrt(Hz)', 'liters'] bit: # description of all bits for type bitmask. # The first bit is 0. @@ -169,7 +170,7 @@ parameters: # enumeration of possible values for type enum type: dict keyschema: - type: integer + type: number valueschema: type: string