Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2105 - 1
#ifndef _FLIGHTCONTROL_H
2
 #define _FLIGHTCONTROL_H
3
 
4
#define EC_VALID           0x01                 //only valid if this is 1
5
#define EC_GAS_ADD         0x02                 //if 1 -> use the GAS Value not as MAX
6
#define EC_IGNORE_RC       0x80                 //if 1 -> for Flying without RC-Control  
7
 
8
#define STARTING_ALTITUDE       1000    
9
#define MAX_ALTITUDE            3000
10
#define MAX_CLIMBING_SPEED      50
11
#define STARTING_THRUST         10
12
 
13
extern void perform_flight_correction();
14
extern void reset_reference_values();
15
extern void flightcontrol_init();
16
extern void transmit_flight_data();
17
extern void flightcontrol_timekeeper();
18
 
19
struct str_3d_data
20
{
21
        int16 AngleNick;    
22
    int16 AngleRoll;  
23
    int16 Heading;    
24
    u8 StickNick;
25
    u8 StickRoll;
26
    u8 StickYaw;
27
    u8 StickGas;
28
    int16 Altimeter;
29
    int16 AccZ;
30
};
31
struct str_3d_data flight_data;
32
 
33
struct str_configuration
34
{
35
        u8 channel_gas;
36
        u8 channel_gier;
37
        u8 channel_nick;
38
        u8 channel_roll;
39
        u8 channel_heightControl;
40
        u8 channel_autostart;
41
        u8 channel_gps;
42
        u8 channel_carefree;
43
        u8 dynamicPositionHold;
44
};
45
struct str_configuration config_data;
46
 
47
struct str_flightcontrol_values
48
{
49
        u8 value_gas;
50
        u8 value_gier;
51
        u8 value_nick;
52
        u8 value_roll;
53
        u8 value_heightControl;
54
        u8 value_autostart;
55
        u8 value_gps;
56
        u8 value_carefree;
57
        u8 value_dynamicPositionHold;
58
};
59
struct str_flightcontrol_values fc_values;
60
 
61
struct str_fc_correction_data
62
{
63
 signed char   Nick;
64
 signed char   Roll;
65
 signed char   Gier;
66
 signed char Gas;
67
 unsigned char Frame;  
68
 unsigned char Config;
69
 unsigned char free;
70
};
71
 
72
struct str_fc_correction_data   fc_correction_data;
73
 
74
#endif //_FLIGHTCONTROL_H