mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 07:47:35 +08:00
lsm303d: fix if style
This commit is contained in:
@@ -1307,8 +1307,9 @@ LSM303D::accel_set_samplerate(unsigned frequency)
|
||||
uint8_t setbits = 0;
|
||||
uint8_t clearbits = REG1_RATE_BITS_A;
|
||||
|
||||
if (frequency == 0 || frequency == ACCEL_SAMPLERATE_DEFAULT)
|
||||
if (frequency == 0 || frequency == ACCEL_SAMPLERATE_DEFAULT) {
|
||||
frequency = 1600;
|
||||
}
|
||||
|
||||
if (frequency <= 100) {
|
||||
setbits |= REG1_RATE_100HZ_A;
|
||||
|
||||
Reference in New Issue
Block a user