mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 17:27:35 +08: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:
@@ -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