Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RTOS-Threads/inc/Task2_Slave.h@29:6c03b30b59ec, 2014-05-10 (annotated)
- Committer:
- pHysiX
- Date:
- Sat May 10 04:06:53 2014 +0000
- Revision:
- 29:6c03b30b59ec
- Parent:
- 27:18b6580eb0b1
- Child:
- 30:d9b988f8d84f
Changed name of program. Still using alternative 2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pHysiX | 27:18b6580eb0b1 | 1 | /* File: Task2_Slave.h |
pHysiX | 22:ef8aa9728013 | 2 | * Author: Trung Tin Ian HUA |
pHysiX | 22:ef8aa9728013 | 3 | * Date: May 2014 |
pHysiX | 27:18b6580eb0b1 | 4 | * Purpose: Thread2-Slave: Gyro sample and Rate PID Control |
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 | 27:18b6580eb0b1 | 12 | #ifndef _TASK2_SLAVE_H_ |
pHysiX | 27:18b6580eb0b1 | 13 | #define _TASK2_SLAVE_H_ |
pHysiX | 1:43f8ac7ca6d7 | 14 | |
pHysiX | 29:6c03b30b59ec | 15 | // ms timing: Refer to tasks.h to change frequency of Task2_Slave. |
pHysiX | 27:18b6580eb0b1 | 16 | #define TASK2_SLAVE_PERIOD 1000/TASK2_MASTER_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 | 27:18b6580eb0b1 | 22 | /* Thread2-Slave: Gyro sample and Rate PID Control */ |
pHysiX | 27:18b6580eb0b1 | 23 | void Task2_Slave(void const *argument); |
pHysiX | 1:43f8ac7ca6d7 | 24 | |
pHysiX | 1:43f8ac7ca6d7 | 25 | #endif |