mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 06:40:34 +08:00
parameters: simplify import mark_unsaved and don't fail bson decode unnecessarily
This commit is contained in:
@@ -529,11 +529,8 @@ do_load(const char *param_file_name)
|
||||
static int
|
||||
do_import(const char *param_file_name)
|
||||
{
|
||||
bool mark_saved = false;
|
||||
|
||||
if (param_file_name == nullptr) {
|
||||
param_file_name = param_get_default_file();
|
||||
mark_saved = true; // if imported from default storage, mark as saved
|
||||
}
|
||||
|
||||
int fd = -1;
|
||||
@@ -549,7 +546,7 @@ do_import(const char *param_file_name)
|
||||
PX4_INFO("importing from '%s'", param_file_name);
|
||||
}
|
||||
|
||||
int result = param_import(fd, mark_saved);
|
||||
int result = param_import(fd);
|
||||
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user