mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 16:17:36 +08:00
param: seek to the beginning of the file before re-trying a failed export attempt
This commit is contained in:
@@ -947,6 +947,10 @@ param_save_default(void)
|
||||
while (res != OK && attempts > 0) {
|
||||
res = param_export(fd, false);
|
||||
attempts--;
|
||||
|
||||
if (res != OK) {
|
||||
lseek(fd, 0, SEEK_SET); // jump back to the beginning of the file
|
||||
}
|
||||
}
|
||||
|
||||
if (res != OK) {
|
||||
|
||||
Reference in New Issue
Block a user