lsm303d: check for default sample rate

This commit is contained in:
Thomas Gubler 2015-01-28 19:19:00 +01:00
parent 90b29efebf
commit dedba4307d
1 changed files with 1 additions and 1 deletions

View File

@ -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) {