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/Task2_Master.h
- Revision:
- 36:d95e3d6f2fc4
- Parent:
- 33:f88a6ee18103
- Child:
- 38:ef65533cca32
--- a/RTOS-Threads/inc/Task2_Master.h Tue May 13 02:44:10 2014 +0000 +++ b/RTOS-Threads/inc/Task2_Master.h Tue May 13 04:05:34 2014 +0000 @@ -1,9 +1,11 @@ /* File: Task2_Master.h * Author: Trung Tin Ian HUA * Date: May 2014 - * Purpose: Thread2-Master: Attitude PID Control - * Settings: 100Hz - */ + * Purpose: Thread2M: Master PID control loop (attitude) + * Functions: AHRSSample: Read MPU6050 DMP and calculate YPR + * Settings: 200Hz + * Timing: //40us + */ #include "mbed.h" #include "rtos.h" #include "tasks.h" @@ -14,9 +16,20 @@ // ms timing: Refer to tasks.h to change frequency of Task2_Master. #define TASK2_MASTER_PERIOD 1000/TASK2_MASTER_FREQUENCY + +#ifdef ENABLE_COMPASS +extern double heading; +#endif + +extern float ypr[3]; extern volatile float adjust_attitude[3]; /* Thread2-Master: Attitude PID Control */ void Task2_Master(void const *argument); +// ======================== +// === Helper functions === +// ======================== +void AHRSSample(void); + #endif