Ian Hua / Quadcopter-mbedRTOS

RTOS-Threads/src/Task3.cpp

Committer:
pHysiX
Date:
2014-04-29
Revision:
2:ab967d7b4346
Parent:
1:43f8ac7ca6d7
Child:
3:605fbcb54e75

File content as of revision 2:ab967d7b4346:

/* RC Command (50Hz) */

#include "tasks.h"
#include "setup.h"

float ypr_offset[3];

void Task3(void const *argument)
{
    if (BT.readable()) {
        char data = BT.getc();
        if (data == 'Z') {
            ypr_offset[0] = ypr[0];
            ypr_offset[1] = ypr[1];
            ypr_offset[2] = ypr[2];
        }
    }

    //LED[3] = !LED[3];
}