From 4a1e9d610b45bdc6f260a080ed17d9c19122aa95 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 22 Mar 2016 20:38:11 +0100 Subject: [PATCH] param_shmem: fix the "unknown param id" bug The recent workaround to flag all params as used did not include param_for_used_index(). However, this function got used in the case if one param had not been received by QGC and was requested by its index. --- src/modules/systemlib/param/param_shmem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/systemlib/param/param_shmem.c b/src/modules/systemlib/param/param_shmem.c index a8c3c9d70b..f011f5ddae 100644 --- a/src/modules/systemlib/param/param_shmem.c +++ b/src/modules/systemlib/param/param_shmem.c @@ -344,6 +344,7 @@ param_for_index(unsigned index) param_t param_for_used_index(unsigned index) { +#if 0 int count = get_param_info_count(); if (count && index < count) { @@ -368,6 +369,9 @@ param_for_used_index(unsigned index) } return PARAM_INVALID; +#else + return param_for_index(index); +#endif } int