mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 05:20:35 +08:00
New param hashing spec
- When listing all params, lead with _HASH_CHECK value for cache load - When set value on _HASH_CHECK is rx'd, stop any ongoing listing req
This commit is contained in:
committed by
Lorenz Meier
parent
854660bd36
commit
0419a99f00
@@ -1121,7 +1121,7 @@ uint32_t param_hash_check(void)
|
||||
const char *name = param_name(param);
|
||||
const void *val = param_get_value_ptr(param);
|
||||
param_hash = crc32part((const uint8_t *)name, strlen(name), param_hash);
|
||||
param_hash = crc32part(val, sizeof(union param_value_u), param_hash);
|
||||
param_hash = crc32part(val, param_size(param), param_hash);
|
||||
}
|
||||
|
||||
param_unlock();
|
||||
|
||||
@@ -82,6 +82,11 @@ typedef uintptr_t param_t;
|
||||
*/
|
||||
#define PARAM_INVALID ((uintptr_t)0xffffffff)
|
||||
|
||||
/**
|
||||
* Magic handle for hash check param
|
||||
*/
|
||||
#define PARAM_HASH ((uintptr_t)INT32_MAX)
|
||||
|
||||
/**
|
||||
* Look up a parameter by name.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user