Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ton_demo ton_template
Revision 3:9c7195d31602, committed 2017-06-29
- Comitter:
- krebyy
- Date:
- Thu Jun 29 20:20:49 2017 +0000
- Parent:
- 2:3a73d77c2cef
- Parent:
- 1:b3c3bf0b9101
- Commit message:
- Update to TON Board V1.2
Changed in this revision
| Ioton.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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)