diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-12-04 22:54:02 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-10 12:04:13 +0100 |
commit | 24a243843ef771273c81536c0bd18c5d70c010f4 (patch) | |
tree | 4c187deecf40bc381a6285e620386ade7bc07e60 /src/drivers/lsm303d | |
parent | 0a83772c0d8b4b600245590d571f679a6894e75f (diff) | |
download | px4-firmware-24a243843ef771273c81536c0bd18c5d70c010f4.tar.gz px4-firmware-24a243843ef771273c81536c0bd18c5d70c010f4.tar.bz2 px4-firmware-24a243843ef771273c81536c0bd18c5d70c010f4.zip |
lsm303d/l3gd20: change filters to 50Hz analog on-chip filters
after discussion with Leonard these analog on-chip filters should be
at 50Hz
Diffstat (limited to 'src/drivers/lsm303d')
-rw-r--r-- | src/drivers/lsm303d/lsm303d.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/lsm303d/lsm303d.cpp b/src/drivers/lsm303d/lsm303d.cpp index a38524c22..701947b98 100644 --- a/src/drivers/lsm303d/lsm303d.cpp +++ b/src/drivers/lsm303d/lsm303d.cpp @@ -631,7 +631,12 @@ LSM303D::reset() accel_set_range(LSM303D_ACCEL_DEFAULT_RANGE_G); accel_set_samplerate(LSM303D_ACCEL_DEFAULT_RATE); accel_set_driver_lowpass_filter((float)LSM303D_ACCEL_DEFAULT_RATE, (float)LSM303D_ACCEL_DEFAULT_DRIVER_FILTER_FREQ); - accel_set_onchip_lowpass_filter_bandwidth(0); // this gives 773Hz + + // we setup the anti-alias on-chip filter as 50Hz. We believe + // this operates in the analog domain, and is critical for + // anti-aliasing. The 2 pole software filter is designed to + // operate in conjunction with this on-chip filter + accel_set_onchip_lowpass_filter_bandwidth(LSM303D_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ); mag_set_range(LSM303D_MAG_DEFAULT_RANGE_GA); mag_set_samplerate(LSM303D_MAG_DEFAULT_RATE); |