Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | /*####################################################################################### |
2 | Flight Control |
||
3 | #######################################################################################*/ |
||
4 | |||
5 | #ifndef _FC_H |
||
6 | #define _FC_H |
||
7 | |||
703 | killagreg | 8 | typedef struct |
9 | { |
||
10 | uint8_t AirPressure_D; |
||
11 | uint8_t MaxHight; |
||
12 | uint8_t Hight_P; |
||
13 | uint8_t Hight_ACC_Effect; |
||
14 | uint8_t CompassYawEffect; |
||
15 | uint8_t Gyro_P; |
||
16 | uint8_t Gyro_I; |
||
17 | uint8_t Gier_P; |
||
18 | uint8_t I_Factor; |
||
19 | uint8_t UserParam1; |
||
20 | uint8_t UserParam2; |
||
21 | uint8_t UserParam3; |
||
22 | uint8_t UserParam4; |
||
23 | uint8_t UserParam5; |
||
24 | uint8_t UserParam6; |
||
25 | uint8_t UserParam7; |
||
26 | uint8_t UserParam8; |
||
27 | uint8_t ServoPitchControl; |
||
28 | uint8_t LoopGasLimit; |
||
29 | uint8_t AchsKopplung1; |
||
30 | uint8_t AchsGegenKopplung1; |
||
31 | uint8_t DynamicStability; |
||
32 | } fc_param_t; |
||
33 | |||
34 | extern fc_param_t FCParam; |
||
35 | |||
36 | extern volatile uint16_t I2CTimeout; |
||
37 | |||
38 | // attitude |
||
39 | extern volatile int32_t IntegralPitch, IntegralRoll, IntegralYaw; |
||
40 | extern volatile int16_t ReadingPitch, ReadingRoll, ReadingYaw; |
||
41 | |||
42 | // offsets |
||
43 | extern volatile int16_t AdNeutralPitch, AdNeutralRoll, AdNeutralYaw; |
||
44 | extern volatile int16_t NeutralAccX, NeutralAccY; |
||
45 | extern volatile float NeutralAccZ; |
||
46 | |||
47 | |||
48 | extern volatile int32_t Reading_Integral_Top; // calculated in analog.c |
||
49 | |||
50 | // compass navigation |
||
51 | extern volatile int16_t CompassHeading; |
||
52 | extern volatile int16_t CompassCourse; |
||
53 | extern volatile int16_t CompassOffCourse; |
||
54 | |||
55 | // hight control |
||
701 | killagreg | 56 | extern int ReadingHight; |
57 | extern int SetPointHight; |
||
703 | killagreg | 58 | |
59 | // mean accelarations |
||
60 | extern volatile int16_t Mean_AccPitch, Mean_AccRoll, Mean_AccTop; |
||
61 | |||
62 | // looping params |
||
701 | killagreg | 63 | extern long TurnOver180Pitch, TurnOver180Roll; |
1 | ingob | 64 | |
703 | killagreg | 65 | // external control |
66 | extern int16_t ExternStickPitch, ExternStickRoll, ExternStickYaw; |
||
67 | |||
68 | |||
1 | ingob | 69 | void MotorRegler(void); |
70 | void SendMotorData(void); |
||
701 | killagreg | 71 | void CalibMean(void); |
72 | void Mean(void); |
||
1 | ingob | 73 | void SetNeutral(void); |
703 | killagreg | 74 | void Beep(uint8_t numbeeps); |
1 | ingob | 75 | |
76 | |||
703 | killagreg | 77 | //extern unsigned char h,m,s; |
499 | hbuss | 78 | |
703 | killagreg | 79 | extern int16_t Poti1, Poti2, Poti3, Poti4; |
1 | ingob | 80 | |
703 | killagreg | 81 | // setpoints for motors |
82 | extern volatile uint8_t Motor_Front, Motor_Rear, Motor_Right, Motor_Left; //used by twimaster isr |
||
1 | ingob | 83 | |
703 | killagreg | 84 | extern int16_t StickPitch, StickRoll, StickYaw; |
85 | extern uint8_t MotorsOn; |
||
396 | hbuss | 86 | |
703 | killagreg | 87 | |
1 | ingob | 88 | #endif //_FC_H |
89 |