Skip to content

Commit

Permalink
plugin:param added logging regarding rerequests
Browse files Browse the repository at this point in the history
  • Loading branch information
angri committed Jan 14, 2019
1 parent b7a27ec commit e57e9da
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mavros/src/plugins/param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,14 @@ class ParamPlugin : public plugin::PluginBase {
parameters_missing_idx.remove(pmsg.param_index);

// in receiving mode we use param_rx_retries for LIST and PARAM
if (it_is_first_requested)
if (it_is_first_requested) {
ROS_DEBUG_NAMED("param", "PR: got a value of a requested param idx=%u, "
"resetting retries count", pmsg.param_index);
param_rx_retries = RETRIES_COUNT;
} else if (param_state == PR::RXPARAM_TIMEDOUT) {
ROS_INFO_NAMED("param", "PR: got an unsolicited param value idx=%u, "
"not resetting retries count %zu", pmsg.param_index, param_rx_retries);
}

restart_timeout_timer();

Expand All @@ -505,6 +511,7 @@ class ParamPlugin : public plugin::PluginBase {
list_receiving.notify_all();
} else if (param_state == PR::RXPARAM_TIMEDOUT) {
uint16_t first_miss_idx = parameters_missing_idx.front();
ROS_DEBUG_NAMED("param", "PR: requesting next timed out parameter idx=%u", first_miss_idx);
param_request_read("", first_miss_idx);
}
}
Expand Down

0 comments on commit e57e9da

Please sign in to comment.