mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 00:47:34 +08:00
param & flashparam param_export: use value directly instead of calling param_get
This call is not needed, and will avoid deadlocks when locking is enabled.
This commit is contained in:
@@ -916,7 +916,7 @@ param_export(int fd, bool only_unsaved)
|
||||
switch (param_type(s->param)) {
|
||||
|
||||
case PARAM_TYPE_INT32: {
|
||||
param_get(s->param, &i);
|
||||
i = s->val.i;
|
||||
const char *name = param_name(s->param);
|
||||
|
||||
/* lock as short as possible */
|
||||
@@ -932,7 +932,7 @@ param_export(int fd, bool only_unsaved)
|
||||
|
||||
case PARAM_TYPE_FLOAT: {
|
||||
|
||||
param_get(s->param, &f);
|
||||
f = s->val.f;
|
||||
const char *name = param_name(s->param);
|
||||
|
||||
/* lock as short as possible */
|
||||
|
||||
Reference in New Issue
Block a user