Rev 2052 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2052 | Rev 2189 | ||
---|---|---|---|
1 | #ifndef _COMPASS_H |
1 | #ifndef _COMPASS_H |
2 | #define _COMPASSRC_H |
2 | #define _COMPASSRC_H |
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
5 | 5 | ||
6 | // 4 modes of control (like with the simple height controller): |
6 | // 4 modes of control (like with the simple height controller): |
7 | // 0) Off: Normal yaw control, supported by compass (anti drift) if present and enabled |
7 | // 0) Off: Normal yaw control, supported by compass (anti drift) if present and enabled |
8 | // 1) Heading is captured at takeoff, and held there (plus / minus bending via remote) |
8 | // 1) Heading is captured at takeoff, and held there (plus / minus bending via remote) |
9 | // 2) A variable controls the heading (plus / minus bending via remote) (not implemented, is it useful at all?) |
9 | // 2) A variable controls the heading (plus / minus bending via remote) (not implemented, is it useful at all?) |
10 | // 3) Navigation controls the heading (plus / minus bending via remote) |
10 | // 3) Navigation controls the heading (plus / minus bending via remote) |
11 | 11 | ||
12 | #define COMPASS_MODE_OFF 0 |
12 | #define COMPASS_MODE_OFF 0 |
13 | #define COMPASS_MODE_TAKEOFF 1 |
13 | #define COMPASS_MODE_TAKEOFF 1 |
14 | //#define COMPASS_MODE_RCVARIABLE 2 |
14 | //#define COMPASS_MODE_RCVARIABLE 2 |
15 | #define COMPASS_MODE_NAVIGATION 3 |
15 | #define COMPASS_MODE_NAVIGATION 3 |
16 | 16 | ||
17 | // public read write. |
17 | // public read write. |
18 | extern int32_t navigationTargetHeading; |
18 | extern int32_t navigationTargetHeading; |
19 | 19 | ||
20 | void compass_setTakeoffHeading(int32_t heading); |
20 | void compass_setTakeoffHeading(int32_t heading); |
21 | void CC_periodicTaskAndPRTY(int16_t* PRTY); |
21 | void CC_periodicTaskAndRPTY(int16_t* RPTY); |
22 | 22 | ||
23 | #endif |
23 | #endif |
24 | 24 |