Ian Hua / Quadcopter-mbedRTOS
Committer:
pHysiX
Date:
Thu May 08 10:33:43 2014 +0000
Revision:
22:ef8aa9728013
Parent:
21:b642c18eccd1
Commented and tidied entire code for release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pHysiX 22:ef8aa9728013 1 /* File: Task2.h
pHysiX 22:ef8aa9728013 2 * Author: Trung Tin Ian HUA
pHysiX 22:ef8aa9728013 3 * Date: May 2014
pHysiX 22:ef8aa9728013 4 * Purpose: Thread2: Gyro sample and PID Control loop
pHysiX 22:ef8aa9728013 5 * Settings: 200Hz
pHysiX 22:ef8aa9728013 6 */
pHysiX 22:ef8aa9728013 7
pHysiX 1:43f8ac7ca6d7 8 #include "mbed.h"
pHysiX 1:43f8ac7ca6d7 9 #include "rtos.h"
pHysiX 1:43f8ac7ca6d7 10 #include "tasks.h"
pHysiX 1:43f8ac7ca6d7 11
pHysiX 1:43f8ac7ca6d7 12 #ifndef _TASK2_H_
pHysiX 1:43f8ac7ca6d7 13 #define _TASK2_H_
pHysiX 1:43f8ac7ca6d7 14
pHysiX 22:ef8aa9728013 15 // ms timing: Refer to tasks.h to change frequency of Task2.
pHysiX 1:43f8ac7ca6d7 16 #define TASK2_PERIOD 1000/TASK2_FREQUENCY
pHysiX 1:43f8ac7ca6d7 17
pHysiX 21:b642c18eccd1 18 extern volatile float adjust[3];
pHysiX 21:b642c18eccd1 19 extern volatile int gyro[3];
pHysiX 10:ef5fe86f67fe 20 extern bool counterESC;
pHysiX 10:ef5fe86f67fe 21
pHysiX 22:ef8aa9728013 22 /* Thread2: Gyro Sample & PID Computation */
pHysiX 1:43f8ac7ca6d7 23 void Task2(void const *argument);
pHysiX 1:43f8ac7ca6d7 24
pHysiX 1:43f8ac7ca6d7 25 #endif