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.
Fork of BMI160 by
Revision 7:9848196cb65e, committed 2016-12-15
- Comitter:
- j3
- Date:
- Thu Dec 15 23:46:42 2016 +0000
- Parent:
- 6:9615aa90087d
- Child:
- 8:a89b529b1d96
- Commit message:
- Fixed PowerModes enum
Changed in this revision
| bmi160.cpp | Show annotated file Show diff for this revision Revisions of this file |
| bmi160.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/bmi160.cpp Thu Dec 15 00:38:04 2016 +0000
+++ b/bmi160.cpp Thu Dec 15 23:46:42 2016 +0000
@@ -74,7 +74,7 @@
rawTemp = ((data[1] << 8) | data[0]);
if(rawTemp & 0x8000)
{
- *temp = (23.0F - (((0xFFFF - rawTemp) + 1)/512.0F));
+ *temp = (23.0F - ((0x10000 - rawTemp)/512.0F));
}
else
{
--- a/bmi160.h Thu Dec 15 00:38:04 2016 +0000
+++ b/bmi160.h Thu Dec 15 23:46:42 2016 +0000
@@ -214,9 +214,9 @@
enum Commands
{
START_FOC = 0x03, ///<Starts Fast Offset Calibrartion
- ACC_SET_PMU_MODE = 0x14, ///<Sets acc power mode
- GYR_SET_PMU_MODE, ///<Sets gyro power mode
- MAG_SET_PMU_MODE, ///<Sets mag power mode
+ ACC_SET_PMU_MODE = 0x10, ///<Sets acc power mode
+ GYR_SET_PMU_MODE = 0x14, ///<Sets gyro power mode
+ MAG_SET_PMU_MODE = 0x18, ///<Sets mag power mode
PROG_NVM = 0xA0, ///<Writes NVM backed registers into NVM
FIFO_FLUSH = 0xB0, ///<Clears FIFO
INT_RESET, ///<Clears interrupt engine, INT_STATUS, and
