Skip to content

Commit 76ce611

Browse files
committed
MAVLink app: Use right lookup function
1 parent 36ca62e commit 76ce611

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/mavlink/mavlink_parameters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ MavlinkParametersManager::handle_message(const mavlink_message_t *msg)
130130

131131
} else {
132132
/* when index is >= 0, send this parameter again */
133-
send_param(param_for_index(req_read.param_index));
133+
send_param(param_for_used_index(req_read.param_index));
134134
}
135135
}
136136
break;
@@ -192,6 +192,7 @@ MavlinkParametersManager::send(const hrt_abstime t)
192192
/* look for the first parameter which is used */
193193
param_t p;
194194
do {
195+
/* walk through all parameters, including unused ones */
195196
p = param_for_index(_send_all_index);
196197
_send_all_index++;
197198
} while (p != PARAM_INVALID && !param_used(p));

0 commit comments

Comments
 (0)