mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
Merge pull request #3227 from thiemar/uavcan_param_save_fix
Don't call param_opcode unless there are dirty nodes [resolves PX4/Firmware#3160]
This commit is contained in:
@@ -523,8 +523,12 @@ pthread_addr_t UavcanServers::run(pthread_addr_t)
|
|||||||
switch (command_id) {
|
switch (command_id) {
|
||||||
case 1: {
|
case 1: {
|
||||||
// Param save request
|
// Param save request
|
||||||
|
int node_id;
|
||||||
|
node_id = get_next_dirty_node_id(1);
|
||||||
|
if (node_id < 128) {
|
||||||
_param_save_opcode = uavcan::protocol::param::ExecuteOpcode::Request::OPCODE_SAVE;
|
_param_save_opcode = uavcan::protocol::param::ExecuteOpcode::Request::OPCODE_SAVE;
|
||||||
param_opcode(get_next_dirty_node_id(1));
|
param_opcode(node_id);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
|
|||||||
Reference in New Issue
Block a user