mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-19 01:10:36 +08:00
params: change return type of param_modify_on_import to enum
Return early in param_import_callback() with 1 if we do a param_set in the param translation. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -1078,7 +1078,10 @@ param_import_callback(bson_decoder_t decoder, bson_node_t node)
|
||||
return 0;
|
||||
}
|
||||
|
||||
param_modify_on_import(node);
|
||||
// if we do param_set() directly in the translation, set PARAM_SKIP_IMPORT as return value and return here
|
||||
if (param_modify_on_import(node) == param_modify_on_import_ret::PARAM_SKIP_IMPORT) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Find the parameter this node represents. If we don't know it, ignore the node.
|
||||
param_t param = param_find_no_notification(node->name);
|
||||
|
||||
Reference in New Issue
Block a user