diff --git a/src/modules/systemlib/param/param.c b/src/modules/systemlib/param/param.c index 19577ecf3c..53e08ad74d 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/modules/systemlib/param/param.c @@ -1048,7 +1048,7 @@ param_export(int fd, bool only_unsaved) param_lock_reader(); - uint8_t bson_buffer[512]; + uint8_t bson_buffer[256]; bson_encoder_init_buf(&encoder, &bson_buffer, sizeof(bson_buffer)); /* no modified parameters -> we are done */ diff --git a/src/modules/systemlib/param/param.h b/src/modules/systemlib/param/param.h index 7a1cdf703f..4bcf1bceb4 100644 --- a/src/modules/systemlib/param/param.h +++ b/src/modules/systemlib/param/param.h @@ -299,6 +299,7 @@ __EXPORT void param_reset_excludes(const char *excludes[], int num_excludes); /** * Export changed parameters to a file. + * Note: this method requires a large amount of stack size! * * @param fd File descriptor to export to. * @param only_unsaved Only export changed parameters that have not yet been exported. @@ -365,6 +366,7 @@ __EXPORT const char *param_get_default_file(void); /** * Save parameters to the default file. + * Note: this method requires a large amount of stack size! * * This function saves all parameters with non-default values. *