aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/lsm303d/lsm303d.cpp
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2014-05-20 11:14:38 +1000
committerLorenz Meier <lm@inf.ethz.ch>2014-07-08 11:43:01 +0200
commitdb304480d996c134fbc2525e5bc96a08178275a9 (patch)
tree64a96e821f085984ca88e19b5e9dd23a1918dd61 /src/drivers/lsm303d/lsm303d.cpp
parentd6999384ceb905f82896b99dda6341c7b615ba7c (diff)
downloadpx4-firmware-db304480d996c134fbc2525e5bc96a08178275a9.tar.gz
px4-firmware-db304480d996c134fbc2525e5bc96a08178275a9.tar.bz2
px4-firmware-db304480d996c134fbc2525e5bc96a08178275a9.zip
lsm303d: disable check_extremes code
this could trigger with a bungee launch, and could cause higher latency due to SD card writes
Diffstat (limited to 'src/drivers/lsm303d/lsm303d.cpp')
-rw-r--r--src/drivers/lsm303d/lsm303d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/lsm303d/lsm303d.cpp b/src/drivers/lsm303d/lsm303d.cpp
index 8bf76dcc3..56baf3274 100644
--- a/src/drivers/lsm303d/lsm303d.cpp
+++ b/src/drivers/lsm303d/lsm303d.cpp
@@ -75,6 +75,10 @@
#endif
static const int ERROR = -1;
+// enable this to debug the buggy lsm303d sensor in very early
+// prototype pixhawk boards
+#define CHECK_EXTREMES 0
+
/* SPI protocol address bits */
#define DIR_READ (1<<7)
#define DIR_WRITE (0<<7)
@@ -830,7 +834,9 @@ LSM303D::read(struct file *filp, char *buffer, size_t buflen)
*/
while (count--) {
if (_accel_reports->get(arb)) {
+#if CHECK_EXTREMES
check_extremes(arb);
+#endif
ret += sizeof(*arb);
arb++;
}