mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 18:13:33 +08:00
uavcan: save parameter after successful set
This commit is contained in:
committed by
Lorenz Meier
parent
06c2d14903
commit
c4499aa7bb
@@ -372,7 +372,11 @@ UavcanNode::set_param(int remote_node_id, const char *name, char *value)
|
|||||||
if (rv == 0) {
|
if (rv == 0) {
|
||||||
rv = get_set_param(remote_node_id, name, req);
|
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);
|
std::printf("Failed to set param: %s\n", name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user