mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Param interface: Publish instance count
This helps subscribers to understand if they should update their parameters or not. We will extend this with other flags such as the current save status and alike.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# This message is used to notify the system about one or more parameter changes
|
||||
|
||||
uint32 dummy # unused
|
||||
uint32 instance # Instance count - constantly incrementing
|
||||
|
||||
@@ -149,6 +149,7 @@ FLASH_PARAMS_EXPOSE const UT_icd param_icd = {sizeof(struct param_wbuf_s), NU
|
||||
#if !defined(PARAM_NO_ORB)
|
||||
/** parameter update topic handle */
|
||||
static orb_advert_t param_topic = NULL;
|
||||
static unsigned int param_instance = 0;
|
||||
#endif
|
||||
|
||||
static void param_set_used_internal(param_t param);
|
||||
@@ -302,7 +303,7 @@ _param_notify_changes(void)
|
||||
#if !defined(PARAM_NO_ORB)
|
||||
struct parameter_update_s pup = {
|
||||
.timestamp = hrt_absolute_time(),
|
||||
.dummy = 0
|
||||
.instance = param_instance++,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user