File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
name =STM32duino LSM303AGR
2
- version =2.0.1
2
+ version =2.0.2
3
3
author =AST
4
4
maintainer =stm32duino
5
5
sentence =3D accelerometer and 3D magnetometer.
Original file line number Diff line number Diff line change @@ -414,9 +414,9 @@ LSM303AGR_ACC_StatusTypeDef LSM303AGR_ACC_Sensor::GetAxesRaw(int16_t *pData)
414
414
}
415
415
416
416
/* Format the data. */
417
- pData[0 ] = ( ( ( ( ( int16_t )regValue[1 ] ) << 8 ) + ( int16_t )regValue[0 ] ) >> shift );
418
- pData[1 ] = ( ( ( ( ( int16_t )regValue[3 ] ) << 8 ) + ( int16_t )regValue[2 ] ) >> shift );
419
- pData[2 ] = ( ( ( ( ( int16_t )regValue[5 ] ) << 8 ) + ( int16_t )regValue[4 ] ) >> shift );
417
+ pData[0 ] = ( (int16_t )( ( ( ( int16_t )regValue[1 ] ) << 8 ) + ( int16_t )regValue[0 ] ) >> shift );
418
+ pData[1 ] = ( (int16_t )( ( ( ( int16_t )regValue[3 ] ) << 8 ) + ( int16_t )regValue[2 ] ) >> shift );
419
+ pData[2 ] = ( (int16_t )( ( ( ( int16_t )regValue[5 ] ) << 8 ) + ( int16_t )regValue[4 ] ) >> shift );
420
420
421
421
return LSM303AGR_ACC_STATUS_OK;
422
422
}
You can’t perform that action at this time.
0 commit comments