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-Setup/src/setup.cpp
- Revision:
- 32:7a9be7761c46
- Parent:
- 30:d9b988f8d84f
- Child:
- 34:228d87c45151
--- a/RTOS-Setup/src/setup.cpp Mon May 12 05:12:19 2014 +0000 +++ b/RTOS-Setup/src/setup.cpp Mon May 12 13:20:06 2014 +0000 @@ -6,12 +6,16 @@ float KP_PITCH_STABLE = 0.5;//0.8; // 0.5; float KP_ROLL_STABLE = 0.5;//0.8; // 0.5; + float KP_YAW_RATE = 8.8; // 8.5 for RATE MODE -float KP_PITCH_RATE = 7.5;//7.6; // 8.5 for RATE MODE -float KP_ROLL_RATE = 7.5;//7.6; // 8.5 for RATE MODE +float KP_PITCH_RATE = 7.0;//7.6; // 8.5 for RATE MODE +float KP_ROLL_RATE = 7.0;//7.5;//7.6; // 8.5 for RATE MODE -float PID_TI_RATE = 0.0; -float PID_TI_STABLE = 0.0; +float TI_YAW_RATE = 8.0;//2.0; +float TI_PITCH_RATE = 2.0;//2.0; +float TI_ROLL_RATE = 2.0;//2.7; + +float PID_TI_STABLE = 1.0; #include "setup.h" #include "tasks.h" @@ -27,9 +31,9 @@ PID pitchPIDstable(KP_PITCH_STABLE, PID_TI_STABLE, 0.0, TASK2_MASTER_PERIOD/1000.0); PID rollPIDstable(KP_ROLL_STABLE, PID_TI_STABLE, 0.0, TASK2_MASTER_PERIOD/1000.0); -PID yawPIDrate(KP_YAW_RATE, PID_TI_RATE, 0.0, TASK2_SLAVE_PERIOD/1000.0); -PID pitchPIDrate(KP_PITCH_RATE, PID_TI_RATE, 0.0, TASK2_SLAVE_PERIOD/1000.0); -PID rollPIDrate(KP_ROLL_RATE, PID_TI_RATE, 0.0, TASK2_SLAVE_PERIOD/1000.0); +PID yawPIDrate(KP_YAW_RATE, 0, 0.0, TASK2_SLAVE_PERIOD/1000.0); +PID pitchPIDrate(KP_PITCH_RATE, TI_PITCH_RATE, 0.0, TASK2_SLAVE_PERIOD/1000.0); +PID rollPIDrate(KP_ROLL_RATE, TI_ROLL_RATE, 0.0, TASK2_SLAVE_PERIOD/1000.0); PwmOut ESC[4] = {p21, p22, p23, p24};