Rev 2099 | Rev 2103 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2099 | Rev 2102 | ||
---|---|---|---|
1 | /*********************************************************************************/ |
1 | /*********************************************************************************/ |
2 | /* Flight Control */ |
2 | /* Flight Control */ |
3 | /*********************************************************************************/ |
3 | /*********************************************************************************/ |
4 | 4 | ||
5 | #ifndef _FLIGHT_H |
5 | #ifndef _FLIGHT_H |
6 | #define _FLIGHT_H |
6 | #define _FLIGHT_H |
7 | 7 | ||
8 | #include <inttypes.h> |
8 | #include <inttypes.h> |
9 | #include "analog.h" |
9 | #include "analog.h" |
10 | #include "configuration.h" |
10 | #include "configuration.h" |
11 | 11 | ||
12 | #define PITCH 0 |
12 | #define PITCH 0 |
13 | #define ROLL 1 |
13 | #define ROLL 1 |
14 | #define YAW 2 |
14 | #define YAW 2 |
15 | 15 | ||
16 | #define MAX_SERVOS 8 |
16 | #define MAX_CONTROL_SERVOS 4 |
17 | - | ||
18 | extern int16_t servos[MAX_SERVOS]; |
- | |
19 | - | ||
20 | typedef enum { |
- | |
21 | FLIGHT_MODE_MANUAL, |
- | |
22 | FLIGHT_MODE_RATE, |
- | |
23 | FLIGHT_MODE_ANGLES |
17 | |
24 | } FlightMode_t; |
18 | extern int16_t controlServos[MAX_CONTROL_SERVOS]; |
25 | 19 | ||
26 | void flight_control(void); |
20 | void flight_control(void); |
27 | void transmitMotorThrottleData(void); |
21 | void transmitMotorThrottleData(void); |
28 | void flight_setNeutral(void); |
22 | void flight_setNeutral(void); |
29 | 23 | ||
30 | #endif //_FLIGHT_H |
24 | #endif //_FLIGHT_H |
31 | 25 |