Change LSM6DS3 power mode using nRF51-DK BLE.

Dependencies:   BLE_API LSM6DS3 mbed nRF51822 nrf51_rtc

Revision:
4:46dd8065e05b
Parent:
3:a43f11f5378f
Child:
5:e2ba3c39e3b3
diff -r a43f11f5378f -r 46dd8065e05b main.cpp
--- a/main.cpp	Wed Jun 22 22:32:58 2016 +0000
+++ b/main.cpp	Fri Jul 08 21:26:38 2016 +0000
@@ -66,12 +66,17 @@
                                    imu.G_POWER_DOWN, imu.A_POWER_DOWN);
                 break;
             case 50:
-                DEBUG("Low power\n\r");
+                DEBUG("Accelerometer Low, Gyro Off\n\r");
                 status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_2G,
-                                   imu.G_ODR_13_BW_0, imu.A_ODR_13);
+                                   imu.G_POWER_DOWN, imu.A_ODR_13);
                 break;
             case 51:
-                DEBUG("High power\n\r");
+                DEBUG("Accelerometer High, Gyro Off\n\r");
+                status = imu.begin(imu.G_SCALE_245DPS, imu.A_SCALE_8G,
+                                   imu.G_POWER_DOWN, imu.A_ODR_6660);
+                break;
+            case 52:
+                DEBUG("Accelerometer High, Gyro High\n\r");
                 status = imu.begin(imu.G_SCALE_2000DPS, imu.A_SCALE_8G,
                                    imu.G_ODR_1660, imu.A_ODR_6660);
                 break;