aboutsummaryrefslogtreecommitdiff
path: root/apps/systemlib/param/param.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-27 22:57:20 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-27 22:57:20 +0200
commit2d2548e714505b1a9d1074c0f9a78c44c8363314 (patch)
treedf4b20758f361f00d40268a4fae4137c77067d0d /apps/systemlib/param/param.c
parent2a6a151342905377c60711c1cade166ffa058e86 (diff)
downloadpx4-firmware-2d2548e714505b1a9d1074c0f9a78c44c8363314.tar.gz
px4-firmware-2d2548e714505b1a9d1074c0f9a78c44c8363314.tar.bz2
px4-firmware-2d2548e714505b1a9d1074c0f9a78c44c8363314.zip
Final parameter interface cleanup - removed last bit of old cruft, fixed a bug on parameter update notification, cleaned up API slightly in naming
Diffstat (limited to 'apps/systemlib/param/param.c')
-rw-r--r--apps/systemlib/param/param.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/systemlib/param/param.c b/apps/systemlib/param/param.c
index acd5674ab..9391558e9 100644
--- a/apps/systemlib/param/param.c
+++ b/apps/systemlib/param/param.c
@@ -57,7 +57,7 @@
#include "systemlib/bson/tinybson.h"
#include "uORB/uORB.h"
-#include "uORB/topics/parameters.h"
+#include "uORB/topics/parameter_update.h"
#if 1
# define debug(fmt, args...) do { warnx(fmt, ##args); } while(0)
@@ -318,6 +318,7 @@ int
param_set(param_t param, const void *val)
{
int result = -1;
+ bool params_changed = false;
param_lock();
@@ -378,7 +379,7 @@ param_set(param_t param, const void *val)
}
s->unsaved = true;
-
+ params_changed = true;
result = 0;
}
@@ -389,7 +390,7 @@ out:
* If we set something, now that we have unlocked, go ahead and advertise that
* a thing has been set.
*/
- if (result != 0) {
+ if (params_changed) {
struct parameter_update_s pup = { .timestamp = hrt_absolute_time() };
/*