aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-01-12 11:53:31 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-01-12 11:53:31 +0100
commitc7e2841baa98bb985b402c89bef85e56f765ec11 (patch)
treed95a450c5ab7664b54ab51f53807c11ab078f914
parentd72c82f66bf6dac8e6d10bf1024641908d3b854c (diff)
downloadpx4-firmware-c7e2841baa98bb985b402c89bef85e56f765ec11.tar.gz
px4-firmware-c7e2841baa98bb985b402c89bef85e56f765ec11.tar.bz2
px4-firmware-c7e2841baa98bb985b402c89bef85e56f765ec11.zip
BMA180 does not publish if disabled
-rw-r--r--src/drivers/bma180/bma180.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/bma180/bma180.cpp b/src/drivers/bma180/bma180.cpp
index 1590cc182..df4e8f998 100644
--- a/src/drivers/bma180/bma180.cpp
+++ b/src/drivers/bma180/bma180.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * Copyright (C) 2012 PX4 Development Team. All rights reserved.
+ * Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -723,7 +723,8 @@ BMA180::measure()
poll_notify(POLLIN);
/* publish for subscribers */
- orb_publish(ORB_ID(sensor_accel), _accel_topic, &report);
+ if !(_pub_blocked)
+ orb_publish(ORB_ID(sensor_accel), _accel_topic, &report);
/* stop the perf counter */
perf_end(_sample_perf);