mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 14:27:35 +08:00
param: implement rate-limited autosave
- add a saving delay of 300ms - save at most once every 2 seconds
This commit is contained in:
@@ -531,7 +531,7 @@ do_set(const char *name, const char *val, bool fail_on_not_found)
|
||||
param_value_unsaved(param) ? '*' : (param_value_is_default(param) ? ' ' : '+'),
|
||||
param_name(param));
|
||||
PARAM_PRINT("curr: %ld", (long)i);
|
||||
param_set_no_autosave(param, &newval);
|
||||
param_set(param, &newval);
|
||||
PARAM_PRINT(" -> new: %ld\n", (long)newval);
|
||||
}
|
||||
}
|
||||
@@ -553,7 +553,7 @@ do_set(const char *name, const char *val, bool fail_on_not_found)
|
||||
param_value_unsaved(param) ? '*' : (param_value_is_default(param) ? ' ' : '+'),
|
||||
param_name(param));
|
||||
PARAM_PRINT("curr: %4.4f", (double)f);
|
||||
param_set_no_autosave(param, &newval);
|
||||
param_set(param, &newval);
|
||||
PARAM_PRINT(" -> new: %4.4f\n", (double)newval);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user