AP_InertialSensor: fix temperature sensor on LSM9DS0

This commit is contained in:
Tatsuya Yamaguchi 2021-03-09 10:50:30 +09:00 committed by Andrew Tridgell
parent be29b23195
commit 2c95093d36
1 changed files with 2 additions and 2 deletions

View File

@ -387,7 +387,7 @@ AP_InertialSensor_LSM9DS0::AP_InertialSensor_LSM9DS0(AP_InertialSensor &imu,
, _rotation_a(rotation_a)
, _rotation_g(rotation_g)
, _rotation_gH(rotation_gH)
, _temp_filter(80, 1)
, _temp_filter(400, 1)
{
}
@ -742,7 +742,7 @@ void AP_InertialSensor_LSM9DS0::_read_data_transaction_a()
_notify_new_accel_raw_sample(_accel_instance, accel_data, AP_HAL::micros64());
// read temperature every 10th sample
if (_temp_counter == 10) {
if (_temp_counter++ >= 10) {
int16_t traw;
const uint8_t regtemp = OUT_TEMP_L_XM | 0xC0;
_temp_counter = 0;