Ian Hua / Quadcopter-mbedRTOS
Revision:
22:ef8aa9728013
Parent:
21:b642c18eccd1
Child:
24:54a8cdf17378
--- a/RTOS-Threads/src/Task2.cpp	Thu May 08 09:39:12 2014 +0000
+++ b/RTOS-Threads/src/Task2.cpp	Thu May 08 10:33:43 2014 +0000
@@ -1,4 +1,9 @@
-/* Gyro & PID (200Hz) */
+/* File:        Task2.cpp
+ * Author:      Trung Tin Ian HUA
+ * Date:        May 2014
+ * Purpose:     Thread2: Gyro sample and PID Control loop
+ * Settings:    200Hz
+ */ 
 
 #include "Task2.h"
 #include "setup.h"
@@ -8,10 +13,8 @@
 volatile float adjust[3] = {0.0, 0.0, 0.0};
 volatile float adjust_stable[3] = {0.0, 0.0, 0.0};
 
-
 int16_t gx, gy, gz;
 volatile int gyro[3] = {0, 0, 0};
-//volatile int gyro_pid[3] = {0, 0, 0};
 
 bool counterESC = false;
 
@@ -53,16 +56,9 @@
 
     counterESC = true;
 
-    //if (adjust_check)
-    //  BT.printf("%4.4f %4.4f %4.4f\n", yaw_adjust, pitch_adjust, roll_adjust);
-
     if (adjust_check)
         BT.printf("%3.4f %3.4f %3.4f\n", adjust[0], adjust[1], adjust[2]);
 
     if (gyro_out)
         BT.printf("%3d %3d %3d\n", (int) gyro[0], (int) gyro[1], (int) gyro[2]);
-    //BT.printf("%3.4f %3.4f %3.4f\n", gyro[0], gyro[1], gyro[2]);
-    //BT.printf("%6d %6d %6d\n", gx, gy, gz);
-
-    //LED[2] = !LED[2];
 }