Ian Hua / Quadcopter-mbedRTOS
Committer:
pHysiX
Date:
Tue Apr 29 11:43:32 2014 +0000
Revision:
2:ab967d7b4346
Parent:
1:43f8ac7ca6d7
Child:
3:605fbcb54e75
Added in simple ESC initialise

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pHysiX 2:ab967d7b4346 1 /* RC Command (50Hz) */
pHysiX 2:ab967d7b4346 2
pHysiX 1:43f8ac7ca6d7 3 #include "tasks.h"
pHysiX 1:43f8ac7ca6d7 4 #include "setup.h"
pHysiX 1:43f8ac7ca6d7 5
pHysiX 1:43f8ac7ca6d7 6 float ypr_offset[3];
pHysiX 1:43f8ac7ca6d7 7
pHysiX 1:43f8ac7ca6d7 8 void Task3(void const *argument)
pHysiX 1:43f8ac7ca6d7 9 {
pHysiX 1:43f8ac7ca6d7 10 if (BT.readable()) {
pHysiX 1:43f8ac7ca6d7 11 char data = BT.getc();
pHysiX 1:43f8ac7ca6d7 12 if (data == 'Z') {
pHysiX 1:43f8ac7ca6d7 13 ypr_offset[0] = ypr[0];
pHysiX 1:43f8ac7ca6d7 14 ypr_offset[1] = ypr[1];
pHysiX 1:43f8ac7ca6d7 15 ypr_offset[2] = ypr[2];
pHysiX 1:43f8ac7ca6d7 16 }
pHysiX 1:43f8ac7ca6d7 17 }
pHysiX 1:43f8ac7ca6d7 18
pHysiX 2:ab967d7b4346 19 //LED[3] = !LED[3];
pHysiX 1:43f8ac7ca6d7 20 }