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.
Diff: RTOS-Threads/src/Task4.cpp
- Revision:
- 2:ab967d7b4346
- Parent:
- 1:43f8ac7ca6d7
- Child:
- 3:605fbcb54e75
--- a/RTOS-Threads/src/Task4.cpp Tue Apr 29 11:02:18 2014 +0000 +++ b/RTOS-Threads/src/Task4.cpp Tue Apr 29 11:43:32 2014 +0000 @@ -1,8 +1,17 @@ +/* Update ESC */ +/* 200Hz <= PWM frequency <= 400Hz */ + #include "tasks.h" #include "setup.h" -/* Extra task */ +int ESCpower[4] = {0, 0, 0, 0}; + void Task4(void const *argurment) { - led4 = !led4; + ESC1.pulsewidth_us(ESCpower[0]); + ESC2.pulsewidth_us(ESCpower[1]); + ESC3.pulsewidth_us(ESCpower[2]); + ESC3.pulsewidth_us(ESCpower[3]); + + //LED[4] = !LED[4]; }