Browse Source

Merge pull request #3230 from thiemar/uavcan_param_count_fix

Fix off-by-one error in parameter count [resolves PX4/Firmware#3162]
sbg
Lorenz Meier 9 years ago
parent
commit
aad434831e
  1. 3
      src/modules/uavcan/uavcan_servers.cpp

3
src/modules/uavcan/uavcan_servers.cpp

@ -575,7 +575,8 @@ void UavcanServers::cb_getset(const uavcan::ServiceCallResult<uavcan::protocol:: @@ -575,7 +575,8 @@ void UavcanServers::cb_getset(const uavcan::ServiceCallResult<uavcan::protocol::
if (result.isSuccessful()) {
uavcan::protocol::param::GetSet::Response resp = result.getResponse();
if (resp.name.size()) {
_param_counts[node_id] = _count_index++;
_count_index++;
_param_counts[node_id] = _count_index;
uavcan::protocol::param::GetSet::Request req;
req.index = _count_index;

Loading…
Cancel
Save