Rev 2099 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2099 | Rev 2103 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #include "configuration.h" |
2 | #include "configuration.h" |
3 | #include "controlMixer.h" |
3 | #include "controlMixer.h" |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | ExternalControl_t externalControl; |
5 | ExternalControl_t externalControl; |
6 | uint8_t externalControlActive = 0; |
- | |
7 | // int16_t EC_PRTY[4]; |
- | |
Line 8... | Line 6... | ||
8 | // TODO: Who is going to call this |
6 | uint8_t externalControlActive = 0; |
9 | 7 | ||
10 | void EC_setNeutral(void) { |
8 | void EC_setNeutral(void) { |
11 | // if necessary. From main.c. |
9 | // if necessary. From main.c. |
Line 17... | Line 15... | ||
17 | 15 | ||
18 | // From main.c. What does it do?? |
16 | // From main.c. What does it do?? |
19 | externalControl.digital[0] = 0x55; |
17 | externalControl.digital[0] = 0x55; |
Line 20... | Line 18... | ||
20 | } |
18 | } |
21 | 19 | ||
22 | void EC_periodicTaskAndPRTY(int16_t* PRTY) { |
20 | void EC_periodicTaskAndPRYT(int16_t* PRYT) { |
23 | if (externalControlActive) { |
21 | if (externalControlActive) { |
24 | externalControlActive--; |
22 | externalControlActive--; |
25 | PRTY[CONTROL_ELEVATOR] += externalControl.pitch * 8; |
23 | PRYT[CONTROL_ELEVATOR] += externalControl.pitch * 8; |
26 | PRTY[CONTROL_AILERONS] += externalControl.roll * 8; |
24 | PRYT[CONTROL_AILERONS] += externalControl.roll * 8; |
27 | PRTY[CONTROL_THROTTLE] += externalControl.throttle * 8; |
25 | PRYT[CONTROL_THROTTLE] += externalControl.throttle * 8; |
28 | PRTY[CONTROL_RUDDER] += externalControl.yaw * 8; |
26 | PRYT[CONTROL_RUDDER] += externalControl.yaw * 8; |
Line 29... | Line 27... | ||
29 | } |
27 | } |
30 | } |
28 | } |