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.
RTOS-Threads/inc/Task3.h
- Committer:
- pHysiX
- Date:
- 2014-05-10
- Revision:
- 27:18b6580eb0b1
- Parent:
- 25:a7cfe421cb4a
- Child:
- 30:d9b988f8d84f
File content as of revision 27:18b6580eb0b1:
/* 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" #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_SCALE 49.60248447 //typedef enum { enum FLIGHT_MODE { RATE, ATTITUDE }; extern float ypr_offset[3]; extern bool box_demo; extern bool rc_out; extern bool gyro_out; extern bool command_check; extern bool adjust_check; extern int RCCommand[5]; extern int inputYPR[3]; extern FLIGHT_MODE mode; /* Thread3: RC & BT Command, and Telemetry */ void Task3(void const *argument); int constrainRCCommand(int input); #endif