Ian Hua / Quadcopter-mbedRTOS

RTOS-Threads/src/Task3.cpp

Committer:
pHysiX
Date:
2014-04-29
Revision:
1:43f8ac7ca6d7
Child:
2:ab967d7b4346

File content as of revision 1:43f8ac7ca6d7:

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

float ypr_offset[3];

/* RC Command (50Hz) */
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];
        }
    }

    led3 = !led3;
}