Ian Hua / Quadcopter-mbedRTOS
Revision:
21:b642c18eccd1
Parent:
20:b193a50a2ba3
Child:
22:ef8aa9728013
--- a/RTOS-Threads/inc/Task2.h	Sat May 03 02:55:24 2014 +0000
+++ b/RTOS-Threads/inc/Task2.h	Thu May 08 09:39:12 2014 +0000
@@ -8,9 +8,9 @@
 // ms
 #define TASK2_PERIOD 1000/TASK2_FREQUENCY
 
-extern int yaw_adjust;
-extern int pitch_adjust;
-extern int roll_adjust;
+extern volatile float adjust[3];
+
+extern volatile int gyro[3];
 
 extern bool counterESC;
 
@@ -18,3 +18,18 @@
 void Task2(void const *argument);
 
 #endif
+
+/*} else {
+    yawPIDrate.setSetPoint(0);
+    pitchPIDrate.setSetPoint(0);
+    rollPIDrate.setSetPoint(0);
+
+    yawPIDrate.setProcessValue(gyro[2]);
+    pitchPIDrate.setProcessValue(gyro[1]);
+    rollPIDrate.setProcessValue(gyro[0]);
+
+    adjust[0] = yawPIDrate.compute();
+    adjust[1] = pitchPIDrate.compute();
+    adjust[2] = rollPIDrate.compute();
+}*/
+