Merge pull request #3230 from thiemar/uavcan_param_count_fix

Fix off-by-one error in parameter count [resolves PX4/Firmware#3162]
This commit is contained in:
Lorenz Meier 2015-11-20 22:32:01 +01:00
commit aad434831e

View File

@ -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;