IOTON boards API using mbed SDK - http://ioton.cc/plataforma-ton
Dependents: ton-bot_teste ton-bot_seguidor_linha ton-bot_seguidor_parede
Fork of IOTON-API by
Diff: BMX055.h
- Revision:
- 3:9c7195d31602
- Parent:
- 2:b3c3bf0b9101
--- a/BMX055.h Thu Jun 29 20:11:00 2017 +0000 +++ b/BMX055.h Thu Jun 29 20:20:49 2017 +0000 @@ -22,7 +22,7 @@ #ifndef M_PI -#define M_PI 3.1415927 +#define M_PI 3.1415927f #endif // Accelerometer registers @@ -472,7 +472,7 @@ uint8_t c = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_D_TEMP); // Read the raw data register int16_t tempCount = ((int16_t)((int16_t)c << 8)) >> 8 ; // Turn the byte into a signed 8-bit integer - return ((((float)tempCount) * 0.5) + 23.0); // temperature in degrees Centigrade + return ((((float)tempCount) * 0.5f) + 23.0f); // temperature in degrees Centigrade } void fastcompaccelBMX055(float * dest1) @@ -508,9 +508,9 @@ int8_t compy = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_OFC_OFFSET_Y); int8_t compz = readByte(BMX055_ACC_ADDRESS, BMX055_ACC_OFC_OFFSET_Z); - dest1[0] = (float) compx/128.; // accleration bias in g - dest1[1] = (float) compy/128.; // accleration bias in g - dest1[2] = (float) compz/128.; // accleration bias in g + dest1[0] = (float) compx/128.0f; // accleration bias in g + dest1[1] = (float) compy/128.0f; // accleration bias in g + dest1[2] = (float) compz/128.0f; // accleration bias in g } void magcalBMX055(float * dest1)