mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
lsm303d: check for default sample rate
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user