mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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.
This commit is contained in:
parent
25cb671a6c
commit
4a1e9d610b
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user