mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 01:43:33 +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:
@@ -344,6 +344,7 @@ param_for_index(unsigned index)
|
|||||||
param_t
|
param_t
|
||||||
param_for_used_index(unsigned index)
|
param_for_used_index(unsigned index)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
int count = get_param_info_count();
|
int count = get_param_info_count();
|
||||||
|
|
||||||
if (count && index < count) {
|
if (count && index < count) {
|
||||||
@@ -368,6 +369,9 @@ param_for_used_index(unsigned index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return PARAM_INVALID;
|
return PARAM_INVALID;
|
||||||
|
#else
|
||||||
|
return param_for_index(index);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user