diff options
author | px4dev <px4@purgatory.org> | 2012-10-31 12:59:24 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-10-31 12:59:24 -0700 |
commit | 8bfceef89cc1fd2422863a99d99039d18a1301bc (patch) | |
tree | 3554d877eb32d57bea1c408cd68b265044c94a67 /apps/systemlib/param/param.h | |
parent | 3c987d63680d153e4d954ad6249d24e5448e2204 (diff) | |
download | px4-firmware-8bfceef89cc1fd2422863a99d99039d18a1301bc.tar.gz px4-firmware-8bfceef89cc1fd2422863a99d99039d18a1301bc.tar.bz2 px4-firmware-8bfceef89cc1fd2422863a99d99039d18a1301bc.zip |
Remove the arbitrary limit on the path to the default parameter file. Add a verb to the param command to set the default parameter file.
Diffstat (limited to 'apps/systemlib/param/param.h')
-rw-r--r-- | apps/systemlib/param/param.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/apps/systemlib/param/param.h b/apps/systemlib/param/param.h index 64bb77834..6fa73b5a4 100644 --- a/apps/systemlib/param/param.h +++ b/apps/systemlib/param/param.h @@ -235,24 +235,39 @@ __EXPORT int param_load(int fd); __EXPORT void param_foreach(void (*func)(void *arg, param_t param), void *arg, bool only_changed); /** - * Export parameters to the default file name. + * Set the default parameter file name. * + * @param filename Path to the default parameter file. The file is not require to + * exist. + * @return Zero on success. + */ +__EXPORT int param_set_default_file(const char* filename); + +/** + * Get the default parameter file name. * - * @param + * @return The path to the current default parameter file; either as + * a result of a call to param_set_default_file, or the + * built-in default. */ -__EXPORT int param_save_default(void); +__EXPORT const char *param_get_default_file(void); /** - * Set the default parameter file name. + * Save parameters to the default file. + * + * This function saves all parameters with non-default values. + * + * @return Zero on success. */ -__EXPORT int param_set_default_file(const char* filename); +__EXPORT int param_save_default(void); /** - * Import parameters from the default file name. + * Load parameters from the default parameter file. + * + * @return Zero on success. */ __EXPORT int param_load_default(void); - /* * Macros creating static parameter definitions. * |