Skip to content

Commit

Permalink
Don't call param_opcode unless there are dirty nodes [resolves PX4#3160]
Browse files Browse the repository at this point in the history
  • Loading branch information
bendyer committed Nov 20, 2015
1 parent 1f33451 commit a27a6ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/uavcan/uavcan_servers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,12 @@ pthread_addr_t UavcanServers::run(pthread_addr_t)
switch (command_id) {
case 1: {
// Param save request
_param_save_opcode = uavcan::protocol::param::ExecuteOpcode::Request::OPCODE_SAVE;
param_opcode(get_next_dirty_node_id(1));
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_opcode(node_id);
}
break;
}
case 2: {
Expand Down

0 comments on commit a27a6ac

Please sign in to comment.