diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-26 14:02:06 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-26 14:02:06 +0200 |
commit | 76ce611e842ce6daed69adb6fb23de7b5bb5b639 (patch) | |
tree | a3e5888ffdfec51d0f648182c161c04925091f45 /src | |
parent | 36ca62ece9cf45eb5c0d4825825825d585f35373 (diff) | |
download | px4-firmware-76ce611e842ce6daed69adb6fb23de7b5bb5b639.tar.gz px4-firmware-76ce611e842ce6daed69adb6fb23de7b5bb5b639.tar.bz2 px4-firmware-76ce611e842ce6daed69adb6fb23de7b5bb5b639.zip |
MAVLink app: Use right lookup function
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/mavlink/mavlink_parameters.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/mavlink/mavlink_parameters.cpp b/src/modules/mavlink/mavlink_parameters.cpp index 20d7cfdbb..2a8b1fdec 100644 --- a/src/modules/mavlink/mavlink_parameters.cpp +++ b/src/modules/mavlink/mavlink_parameters.cpp @@ -130,7 +130,7 @@ MavlinkParametersManager::handle_message(const mavlink_message_t *msg) } else { /* when index is >= 0, send this parameter again */ - send_param(param_for_index(req_read.param_index)); + send_param(param_for_used_index(req_read.param_index)); } } break; @@ -192,6 +192,7 @@ MavlinkParametersManager::send(const hrt_abstime t) /* look for the first parameter which is used */ param_t p; do { + /* walk through all parameters, including unused ones */ p = param_for_index(_send_all_index); _send_all_index++; } while (p != PARAM_INVALID && !param_used(p)); |