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/Task3.cpp
- Revision:
- 22:ef8aa9728013
- Parent:
- 21:b642c18eccd1
- Child:
- 24:54a8cdf17378
--- a/RTOS-Threads/src/Task3.cpp Thu May 08 09:39:12 2014 +0000 +++ b/RTOS-Threads/src/Task3.cpp Thu May 08 10:33:43 2014 +0000 @@ -1,4 +1,9 @@ -/* RC & BT Command & Telemetry (50Hz) */ +/* File: Task3.cpp + * Author: Trung Tin Ian HUA + * Date: May 2014 + * Purpose: Thread3: RC & BT Command, and Telemetry + * Settings: 50Hz + */ #define STICK_GAIN 2 #define STICK_GAIN_YAW 4 @@ -22,6 +27,7 @@ /* [YAW PITCH ROLL THROTTLE AUX] */ int RCCommand[5] = {0, 0, 0, 0, 0}; +/* Decoded input: [YAW PITCH ROLL] */ int inputYPR[3]; void Task3(void const *argument) @@ -285,7 +291,6 @@ //armed = false; for (int i = 0; i < 5; i++) RCCommand[i] = 0; - // Perhaps need to directly control ESCpower[i] instead of writing to RCCommand } else { for (int i = 0; i < 5; i++) RCCommand[i] = constrainRCCommand(RCCommand[i]); @@ -298,8 +303,6 @@ BT.printf("%5d %5d %5d %5d %5d\n", RCCommand[0], RCCommand[1], RCCommand[2], RCCommand[3], RCCommand[4]); else if (command_check) BT.printf("%3d %3d %3d\n", inputYPR[0], inputYPR[1], inputYPR[2]); - - //LED[3] = !LED[3]; } int constrainRCCommand(int input)