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/src/Task2.cpp
- Revision:
- 24:54a8cdf17378
- Parent:
- 22:ef8aa9728013
- Child:
- 25:a7cfe421cb4a
--- a/RTOS-Threads/src/Task2.cpp Thu May 08 10:49:38 2014 +0000 +++ b/RTOS-Threads/src/Task2.cpp Thu May 08 13:00:50 2014 +0000 @@ -32,17 +32,18 @@ pitchPIDstable.setSetPoint(inputYPR[1]); rollPIDstable.setSetPoint(inputYPR[2]); - pitchPIDstable.setProcessValue(ypr[1] - ypr_offset[1]); - rollPIDstable.setProcessValue(ypr[2] - ypr_offset[2]); + pitchPIDstable.setProcessValue((int) (ypr[1] - ypr_offset[1])); + rollPIDstable.setProcessValue((int) (ypr[2] - ypr_offset[2])); adjust_stable[1] = pitchPIDstable.compute(); adjust_stable[2] = rollPIDstable.compute(); + adjust_stable[2] *= -1; yawPIDrate.setSetPoint(inputYPR[0]); - pitchPIDrate.setSetPoint(inputYPR[1]); - rollPIDrate.setSetPoint(inputYPR[2]); - //pitchPIDrate.setSetPoint(adjust_stable[1]); - //rollPIDrate.setSetPoint(adjust_stable[2]); + //pitchPIDrate.setSetPoint(inputYPR[1]); + //rollPIDrate.setSetPoint(inputYPR[2]); + pitchPIDrate.setSetPoint(adjust_stable[1]); + rollPIDrate.setSetPoint(adjust_stable[2]); yawPIDrate.setProcessValue(gyro[2]); pitchPIDrate.setProcessValue(gyro[1]); @@ -53,7 +54,6 @@ adjust[2] = rollPIDrate.compute(); counterTask1 = false; - counterESC = true; if (adjust_check)