parameters: fix export shutdown locking

- in NuttX bchlib keeps a sector sized buffer that might not be written
out to RAMTRON until the file is closed
This commit is contained in:
Daniel Agar
2022-01-02 10:46:34 -05:00
parent 2153710917
commit 9cbb5c9920
7 changed files with 124 additions and 138 deletions
@@ -143,12 +143,6 @@ out:
size_t buf_size = bson_encoder_buf_size(&encoder);
int shutdown_lock_ret = px4_shutdown_lock();
if (shutdown_lock_ret) {
PX4_ERR("px4_shutdown_lock() failed (%i)", shutdown_lock_ret);
}
/* Get a buffer from the flash driver with enough space */
uint8_t *buffer;
@@ -177,11 +171,6 @@ out:
free(enc_buff);
parameter_flashfs_free();
}
if (shutdown_lock_ret == 0) {
px4_shutdown_unlock();
}
}
return result;