Ian Hua / Quadcopter-mbedRTOS
Revision:
22:ef8aa9728013
Parent:
21:b642c18eccd1
Child:
27:18b6580eb0b1
--- a/RTOS-Threads/inc/Task4.h	Thu May 08 09:39:12 2014 +0000
+++ b/RTOS-Threads/inc/Task4.h	Thu May 08 10:33:43 2014 +0000
@@ -1,3 +1,12 @@
+/* File:        Task4.h
+ * Author:      Trung Tin Ian HUA
+ * Date:        May 2014
+ * Purpose:     Thread4: ESC pulsewidth update. Note this is INDEPENDENT of the pulse frequency.
+ * Settings:    200Hz
+ * 200Hz <= PWM frequency <= 400Hz
+ * Refer to setup.h to change PWM frequency 
+ */ 
+
 #include "mbed.h"
 #include "rtos.h"
 #include "tasks.h"
@@ -5,6 +14,7 @@
 #ifndef _TASK4_H_
 #define _TASK4_H_
 
+// ms timing: Refer to tasks.h to change frequency of Task4.
 #define TASK4_PERIOD 1000/TASK4_FREQUENCY
 
 extern int ESCpower[4];
@@ -13,8 +23,7 @@
 extern bool ESC_check;
 extern bool calibration_mode;
 
-/* Update ESC */
-/* 200Hz <= PWM frequency <= 400Hz */
+/* Thread4: Update ESC pulsewidth */
 void Task4(void const *argument);
 
 int constrainESC(float input);