Ian Hua / Quadcopter-mbedRTOS

RTOS-Threads/src/Task4.cpp

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

File content as of revision 2:ab967d7b4346:

/* Update ESC */
/* 200Hz <= PWM frequency <= 400Hz */

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

int ESCpower[4] = {0, 0, 0, 0};

void Task4(void const *argurment)
{
    ESC1.pulsewidth_us(ESCpower[0]);
    ESC2.pulsewidth_us(ESCpower[1]);
    ESC3.pulsewidth_us(ESCpower[2]);
    ESC3.pulsewidth_us(ESCpower[3]);
    
    //LED[4] = !LED[4];
}