mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 22:43:34 +08:00
params: add possibility to access files if flash-based params are enabled
- the flash-backend is selected by specifying nullptr as file or -1 as fd - the default file is nullptr, and thus the FLASH - 'param select' has no effect, FLASH is always the default Thus there should be no functional change to existing setups.
This commit is contained in:
@@ -353,9 +353,9 @@ out:
|
||||
return result;
|
||||
}
|
||||
|
||||
int flash_param_save()
|
||||
int flash_param_save(bool only_unsaved)
|
||||
{
|
||||
return param_export_internal(false);
|
||||
return param_export_internal(only_unsaved);
|
||||
}
|
||||
|
||||
int flash_param_load()
|
||||
@@ -366,5 +366,5 @@ int flash_param_load()
|
||||
|
||||
int flash_param_import()
|
||||
{
|
||||
return -1;
|
||||
return param_import_internal(false);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ __EXPORT int param_set_external(param_t param, const void *val, bool mark_saved,
|
||||
__EXPORT const void *param_get_value_ptr_external(param_t param);
|
||||
|
||||
/* The interface hooks to the Flash based storage. The caller is responsible for locking */
|
||||
__EXPORT int flash_param_save();
|
||||
__EXPORT int flash_param_save(bool only_unsaved);
|
||||
__EXPORT int flash_param_load();
|
||||
__EXPORT int flash_param_import();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user