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:
- 44:4be5c01c6de2
- Parent:
- 40:27e344adfdb9
- Child:
- 45:3847d7bf8b2c
diff -r ec2146e37922 -r 4be5c01c6de2 RTOS-Threads/src/Task3.cpp
--- a/RTOS-Threads/src/Task3.cpp Fri May 16 23:20:01 2014 +0000
+++ b/RTOS-Threads/src/Task3.cpp Fri May 16 23:34:20 2014 +0000
@@ -12,10 +12,10 @@
AnalogIn voltageSense(p20);
/* [YAW PITCH ROLL THROTTLE AUX] */
-int RCCommand[5] = {0, 0, 0, 0, 0};
+volatile int RCCommand[5] = {0, 0, 0, 0, 0};
/* Decoded input: [YAW PITCH ROLL] */
-int inputYPR[3];
-float ypr_offset[3];
+volatile int inputYPR[3];
+volatile float ypr_offset[3];
float vIn = 0.0;
@@ -66,8 +66,8 @@
inputYPR[0] = (RCCommand[0]-1500)*9/100*STICK_GAIN_YAW;
switch (mode) {
case RATE:
- inputYPR[1] = deadbandInputYPR((RCCommand[1]-1500)*-1*9/100*STICK_GAIN);
- inputYPR[2] = deadbandInputYPR((RCCommand[2]-1500)*9/100*STICK_GAIN);
+ inputYPR[1] = deadbandInputYPR((RCCommand[1]-1500)*-1*6/100*STICK_GAIN);
+ inputYPR[2] = deadbandInputYPR((RCCommand[2]-1500)*6/100*STICK_GAIN);
break;
case ATTITUDE:
default: