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/Task3.cpp
- Revision:
- 51:04c6af4319e1
- Parent:
- 50:8a0accb23007
diff -r 8a0accb23007 -r 04c6af4319e1 RTOS-Threads/src/Task3.cpp
--- a/RTOS-Threads/src/Task3.cpp Mon May 19 14:16:47 2014 +0000
+++ b/RTOS-Threads/src/Task3.cpp Mon May 19 15:30:05 2014 +0000
@@ -40,8 +40,11 @@
/* Lost signal (throttle): */
if (rxModule[2].stallTimer.read_us() > 18820) {
- for (int i = 0; i < 5; i++)
- RCCommand[i] = 1000;
+ RCCommand[0] = 1500;
+ RCCommand[1] = 1500;
+ RCCommand[2] = 1500;
+ RCCommand[3] = 1000;
+ RCCommand[4] = 1000;
} else {
for (int i = 0; i < 5; i++)
RCCommand[i] = constrainRCCommand(RCCommand[i]);
@@ -53,16 +56,12 @@
} else if (mode == ATTITUDE) {
mode = RATE;
yawPIDrate.reset();
- //pitchPIDrate.setTunings(KP_PITCH_RATE, TI_PITCH_RATE, 0.0);
- //rollPIDrate.setTunings(KP_ROLL_RATE, TI_ROLL_RATE, 0.0);
} else {}
} else {
if (mode == ATTITUDE) {
} else if (mode == RATE) {
mode = ATTITUDE;
yawPIDrate.reset();
- //pitchPIDrate.setTunings(KP_PITCH_RATE, TI_PITCH_RATE, 0.0);
- //rollPIDrate.setTunings(KP_ROLL_RATE, TI_PITCH_RATE, 0.0);
}
}