Skip to content

Commit

Permalink
[peripherals] mpu60x0_i2c: fix temp reading
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Apr 18, 2015
1 parent b6fcddd commit 2efdc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sw/airborne/peripherals/mpu60x0_i2c.c
Expand Up @@ -95,7 +95,7 @@ void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
mpu->data_rates.rates.q = Int16FromBuf(mpu->i2c_trans.buf, 11);
mpu->data_rates.rates.r = Int16FromBuf(mpu->i2c_trans.buf, 13);

int16_t temp_raw = Int16FromBuf(mpu->rx_buf, 8);
int16_t temp_raw = Int16FromBuf(mpu->i2c_trans.buf, 7);
mpu->temp = (float)temp_raw / 340.0f + 36.53f;

// if we are reading slaves through the mpu, copy the ext_sens_data
Expand Down

0 comments on commit 2efdc01

Please sign in to comment.