mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
uavcan: save parameter after successful set
This commit is contained in:
parent
06c2d14903
commit
c4499aa7bb
@ -372,7 +372,11 @@ UavcanNode::set_param(int remote_node_id, const char *name, char *value)
|
||||
if (rv == 0) {
|
||||
rv = get_set_param(remote_node_id, name, req);
|
||||
|
||||
if (rv < 0 || resp.name.empty()) {
|
||||
if (rv == 0) {
|
||||
// commit parameter change
|
||||
save_params(remote_node_id);
|
||||
|
||||
} else if (rv < 0 || resp.name.empty()) {
|
||||
std::printf("Failed to set param: %s\n", name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user