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:
- 22:ef8aa9728013
- Parent:
- 21:b642c18eccd1
- Child:
- 24:54a8cdf17378
--- a/RTOS-Threads/src/Task4.cpp Thu May 08 09:39:12 2014 +0000 +++ b/RTOS-Threads/src/Task4.cpp Thu May 08 10:33:43 2014 +0000 @@ -1,5 +1,11 @@ -/* Update ESC (100Hz) */ -/* 200Hz <= PWM frequency (400Hz) <= 400Hz */ +/* File: Task4.h + * Author: Trung Tin Ian HUA + * Date: May 2014 + * Purpose: Thread4: ESC pulsewidth update. Note this is INDEPENDENT of the pulse frequency. + * Settings: 200Hz + * 200Hz <= PWM frequency <= 400Hz + * Refer to setup.h to change PWM frequency + */ #include "tasks.h" #include "setup.h" @@ -18,9 +24,7 @@ for (int i = 0; i < 4; i++) ESC[i].pulsewidth_us(RCCommand[3]); } else if (RCCommand[3] > 1150) { - if (counterESC) { - /* [YAW PITCH ROLL THROTTLE AUX] */ - + if (counterESC) { for (int i = 0; i < 3; i++) adjust[i] /= 2.0; @@ -61,8 +65,6 @@ if (ESC_check) BT.printf("%4d %4d %4d %4d\n", ESCpower[0], ESCpower[1], ESCpower[2], ESCpower[3]); - - //LED[4] = !LED[4]; } int constrainESC(float input)