Rev 2048 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2048 | Rev 2052 | ||
---|---|---|---|
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 | ||
- | 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 |
|
- | 8 | // 1) Heading is captured at takeoff, and held there (plus / minus bending via remote) |
|
5 | 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) |
|
- | 11 | ||
- | 12 | #define COMPASS_MODE_OFF 0 |
|
- | 13 | #define COMPASS_MODE_TAKEOFF 1 |
|
- | 14 | //#define COMPASS_MODE_RCVARIABLE 2 |
|
- | 15 | #define COMPASS_MODE_NAVIGATION 3 |
|
- | 16 | ||
- | 17 | // public read write. |
|
- | 18 | extern int32_t navigationTargetHeading; |
|
6 | extern int32_t magneticTargetHeading; |
19 | |
7 | 20 | void compass_setTakeoffHeading(int32_t heading); |
|
8 | void CC_periodicTaskAndPRTY(int16_t* PRTY); |
21 | void CC_periodicTaskAndPRTY(int16_t* PRTY); |
9 | 22 | ||
10 | #endif |
23 | #endif |
11 | 24 |