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/inc/Task3.h
- Revision:
- 22:ef8aa9728013
- Parent:
- 21:b642c18eccd1
- Child:
- 25:a7cfe421cb4a
--- a/RTOS-Threads/inc/Task3.h Thu May 08 09:39:12 2014 +0000 +++ b/RTOS-Threads/inc/Task3.h Thu May 08 10:33:43 2014 +0000 @@ -1,3 +1,10 @@ +/* File: Task3.h + * Author: Trung Tin Ian HUA + * Date: May 2014 + * Purpose: Thread3: RC & BT Command, and Telemetry + * Settings: 50Hz + */ + #include "mbed.h" #include "rtos.h" #include "tasks.h" @@ -5,13 +12,13 @@ #ifndef _TASK3_H_ #define _TASKS3_H_ +// ms timing: Refer to tasks.h to change frequency of Task3. #define TASK3_PERIOD 1000/TASK3_FREQUENCY /* Scale: Vin = ADC * Vread * scale Vin = (2^n-1)/3.3 * k*Vin * scale * ADJUST */ -//#define VOLTAGE_DIVIDER 0.05061465 #define VOLTAGE_SCALE 49.60248447 extern float ypr_offset[3]; @@ -22,11 +29,10 @@ extern bool command_check; extern bool adjust_check; -/* [YAW PITCH ROLL THROTTLE AUX] */ extern int RCCommand[5]; extern int inputYPR[3]; -/* RC & BT Command & Telemetry (50Hz) */ +/* Thread3: RC & BT Command, and Telemetry */ void Task3(void const *argument); int constrainRCCommand(int input);