parameter_update.msg: add basic status info

This commit is contained in:
Daniel Agar
2021-02-08 20:50:13 -05:00
parent b8b13bb882
commit ce64951578
4 changed files with 20 additions and 6 deletions
+8 -5
View File
@@ -256,13 +256,16 @@ void
param_notify_changes()
{
parameter_update_s pup{};
pup.timestamp = hrt_absolute_time();
pup.instance = param_instance++;
pup.get_count = perf_event_count(param_get_perf);
pup.set_count = perf_event_count(param_set_perf);
pup.find_count = perf_event_count(param_find_perf);
pup.export_count = perf_event_count(param_export_perf);
pup.active = params_active.count();
pup.changed = params_changed.count();
pup.custom_default = params_custom_default.count();
pup.timestamp = hrt_absolute_time();
/*
* If we don't have a handle to our topic, create one now; otherwise
* just publish.
*/
if (param_topic == nullptr) {
param_topic = orb_advertise(ORB_ID(parameter_update), &pup);