Make parameter generation also depend on the scripts that run. Address some review comments.

This commit is contained in:
Stephan Brown 2017-01-05 12:02:39 -08:00 committed by Beat Küng
parent 92b2395ff6
commit 67a484ac34
4 changed files with 5 additions and 10 deletions

View File

@ -42,9 +42,6 @@ __BEGIN_DECLS
struct px4_parameters_t {
"""
start_name = ""
end_name = ""
params = []
for group in root:
if group.tag == "group" and "no_code_generation" not in group.attrib:
@ -52,9 +49,6 @@ for group in root:
scope_ = param.find('scope').text
if not cmake_scope.Has(scope_):
continue
if not start_name:
start_name = param.attrib["name"]
end_name = param.attrib["name"]
params.append(param)
params = sorted(params, key=lambda name: name.attrib["name"])

View File

@ -1024,7 +1024,8 @@ function(px4_generate_parameters_xml)
add_custom_command(OUTPUT ${OUT}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_params.py
-s ${path} --board CONFIG_ARCH_${BOARD} --xml --inject-xml --scope ${SCOPE}
DEPENDS ${param_src_files}
DEPENDS ${param_src_files} ${PX4_SOURCE_DIR}/Tools/px_process_params.py
${PX4_SOURCE_DIR}/Tools/px_generate_params.py
)
set(${OUT} ${${OUT}} PARENT_SCOPE)
endfunction()

View File

@ -263,7 +263,7 @@ param_find_internal(const char *name, bool notification)
{
param_t middle;
param_t front = 0;
param_t last = get_param_info_count() - 1;
param_t last = get_param_info_count();
/* perform a binary search of the known parameters */
@ -278,7 +278,7 @@ param_find_internal(const char *name, bool notification)
return middle;
} else if (middle == front || middle == last) {
} else if (middle == front) {
/* An end point has been hit, but there has been no match */
break;

View File

@ -351,7 +351,7 @@ do_find(const char *name)
return 1;
}
printf("Found param %s at index %lu\n", name, ret);
printf("Found param %s at index %"PRIxPTR"\n", name, ret);
return 0;
}