mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 18:09:05 +08:00
l3gd20: check for default sample rate
This commit is contained in:
parent
e2524b9aed
commit
90b29efebf
@ -784,7 +784,7 @@ L3GD20::set_samplerate(unsigned frequency)
|
||||
{
|
||||
uint8_t bits = REG1_POWER_NORMAL | REG1_Z_ENABLE | REG1_Y_ENABLE | REG1_X_ENABLE;
|
||||
|
||||
if (frequency == 0)
|
||||
if (frequency == 0 || frequency == GYRO_SAMPLERATE_DEFAULT)
|
||||
frequency = _is_l3g4200d ? 800 : 760;
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user