From dedba4307de2b99ee3a9fd2d6c31c031bd4524ed Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Wed, 28 Jan 2015 19:19:00 +0100 Subject: [PATCH] lsm303d: check for default sample rate --- src/drivers/lsm303d/lsm303d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/lsm303d/lsm303d.cpp b/src/drivers/lsm303d/lsm303d.cpp index 2a0bf522bb..6d017b4d26 100644 --- a/src/drivers/lsm303d/lsm303d.cpp +++ b/src/drivers/lsm303d/lsm303d.cpp @@ -1307,7 +1307,7 @@ LSM303D::accel_set_samplerate(unsigned frequency) uint8_t setbits = 0; uint8_t clearbits = REG1_RATE_BITS_A; - if (frequency == 0) + if (frequency == 0 || frequency == ACCEL_SAMPLERATE_DEFAULT) frequency = 1600; if (frequency <= 100) {