Ian Hua / Quadcopter-mbedRTOS
Revision:
48:9dbdc4144f00
Parent:
38:ef65533cca32
Child:
50:8a0accb23007
--- a/RTOS-Threads/src/Task2_Slave.cpp	Sat May 17 11:57:09 2014 +0000
+++ b/RTOS-Threads/src/Task2_Slave.cpp	Mon May 19 13:21:17 2014 +0000
@@ -78,21 +78,11 @@
 // ************************
 void gyroSample(void)
 {
-    imu.getRotation(&gx, &gy, &gz);
+    imu_nb.getRotation(&gx, &gy, &gz);
     gyro[0] = gx + 60;
     gyro[1] = gy - 15;
     gyro[2] = gz - 8;
 
     for (int i = 0; i < 3; i++)
         gyro[i] /= (float) 32.8;
-
-    //gyro[2] = deadbandGyroYaw(gyro[2]);
 }
-
-float deadbandGyroYaw(float input)
-{
-    if (input > -1.1 && input < 1.1)
-        return 0.0;
-    else
-        return input;
-}