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/Task4.h
- Revision:
- 22:ef8aa9728013
- Parent:
- 21:b642c18eccd1
- Child:
- 27:18b6580eb0b1
--- a/RTOS-Threads/inc/Task4.h Thu May 08 09:39:12 2014 +0000 +++ b/RTOS-Threads/inc/Task4.h Thu May 08 10:33:43 2014 +0000 @@ -1,3 +1,12 @@ +/* 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 "mbed.h" #include "rtos.h" #include "tasks.h" @@ -5,6 +14,7 @@ #ifndef _TASK4_H_ #define _TASK4_H_ +// ms timing: Refer to tasks.h to change frequency of Task4. #define TASK4_PERIOD 1000/TASK4_FREQUENCY extern int ESCpower[4]; @@ -13,8 +23,7 @@ extern bool ESC_check; extern bool calibration_mode; -/* Update ESC */ -/* 200Hz <= PWM frequency <= 400Hz */ +/* Thread4: Update ESC pulsewidth */ void Task4(void const *argument); int constrainESC(float input);