Rev 2138 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2138 | Rev 2139 | ||
---|---|---|---|
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 | #define THROTTLE 3 |
15 | #define THROTTLE 3 |
16 | 16 | ||
17 | #define LOG_STICK_SCALE 8 |
17 | #define LOG_STICK_SCALE 6 |
18 | #define LOG_P_SCALE 9 |
18 | #define LOG_P_SCALE 8 |
19 | #define LOG_I_SCALE 12 |
19 | #define LOG_I_SCALE 12 |
20 | #define LOG_D_SCALE 8 |
20 | #define LOG_D_SCALE 8 |
21 | 21 | ||
22 | #define NUM_CONTROL_SERVOS 4 |
22 | #define NUM_CONTROL_SERVOS 4 |
23 | 23 | ||
24 | extern int16_t controlServos[NUM_CONTROL_SERVOS]; |
24 | extern int16_t controlServos[NUM_CONTROL_SERVOS]; |
25 | 25 | ||
26 | void flight_control(void); |
26 | void flight_control(void); |
27 | void flight_setNeutral(void); |
27 | void flight_setNeutral(void); |
28 | void flight_updateFlightParametersToFlightMode(void); |
28 | void flight_updateFlightParametersToFlightMode(void); |
29 | 29 | ||
30 | #endif //_FLIGHT_H |
30 | #endif //_FLIGHT_H |
31 | 31 |