Rev 1692 | Rev 1703 | Go to most recent revision | Details | Compare with Previous | 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 |
||
1111 | hbuss | 7 | //#define GIER_GRAD_FAKTOR 1291L // Abhängigkeit zwischen GyroIntegral und Winkel |
1243 | killagreg | 8 | //#define GIER_GRAD_FAKTOR 1160L |
1121 | hbuss | 9 | extern long GIER_GRAD_FAKTOR; // Abhängigkeit zwischen GyroIntegral und Winkel |
855 | hbuss | 10 | #define STICK_GAIN 4 |
921 | hbuss | 11 | |
1420 | killagreg | 12 | #define FCFLAG_MOTOR_RUN 0x01 |
13 | #define FCFLAG_FLY 0x02 |
||
14 | #define FCFLAG_CALIBRATE 0x04 |
||
15 | #define FCFLAG_START 0x08 |
||
16 | #define FCFLAG_NOTLANDUNG 0x10 |
||
17 | #define FCFLAG_LOWBAT 0x20 |
||
18 | #define FCFLAG_SPI_RX_ERR 0x40 |
||
1423 | hbuss | 19 | #define FCFLAG_I2CERR 0x80 |
1254 | killagreg | 20 | |
1702 | holgerb | 21 | #define DEFEKT_G_NICK 0x01 |
22 | #define DEFEKT_G_ROLL 0x02 |
||
23 | #define DEFEKT_G_GIER 0x04 |
||
24 | #define DEFEKT_A_NICK 0x08 |
||
25 | #define DEFEKT_A_ROLL 0x10 |
||
26 | #define DEFEKT_A_Z 0x20 |
||
27 | #define DEFEKT_PRESSURE 0x40 |
||
28 | #define DEFEKT_CAREFREE_ERR 0x80 |
||
29 | |||
30 | #define DEFEKT_I2C 0x01 |
||
31 | #define DEFEKT_BL_MISSING 0x02 |
||
32 | #define DEFEKT_SPI_RX_ERR 0x04 |
||
33 | #define DEFEKT_PPM_ERR 0x08 |
||
34 | #define DEFEKT_MIXER_ERR 0x10 |
||
35 | |||
1377 | hbuss | 36 | #define Poti1 Poti[0] |
37 | #define Poti2 Poti[1] |
||
38 | #define Poti3 Poti[2] |
||
39 | #define Poti4 Poti[3] |
||
40 | #define Poti5 Poti[4] |
||
41 | #define Poti6 Poti[5] |
||
42 | #define Poti7 Poti[6] |
||
43 | #define Poti8 Poti[7] |
||
1254 | killagreg | 44 | |
1420 | killagreg | 45 | extern volatile unsigned char FCFlags; |
1 | ingob | 46 | extern unsigned char Sekunde,Minute; |
1352 | hbuss | 47 | extern unsigned int BaroExpandActive; |
693 | hbuss | 48 | extern long IntegralNick,IntegralNick2; |
49 | extern long IntegralRoll,IntegralRoll2; |
||
1153 | hbuss | 50 | //extern int IntegralNick,IntegralNick2; |
51 | //extern int IntegralRoll,IntegralRoll2; |
||
1420 | killagreg | 52 | extern unsigned char Poti[9]; |
1153 | hbuss | 53 | |
693 | hbuss | 54 | extern long Mess_IntegralNick,Mess_IntegralNick2; |
55 | extern long Mess_IntegralRoll,Mess_IntegralRoll2; |
||
56 | extern long IntegralAccNick,IntegralAccRoll; |
||
1685 | holgerb | 57 | extern long SummeNick,SummeRoll; |
1 | ingob | 58 | extern volatile long Mess_Integral_Hoch; |
693 | hbuss | 59 | extern long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2; |
1153 | hbuss | 60 | extern int KompassValue; |
61 | extern int KompassStartwert; |
||
62 | extern int KompassRichtung; |
||
1664 | holgerb | 63 | extern unsigned char ControlHeading; |
1166 | hbuss | 64 | extern int TrimNick, TrimRoll; |
717 | hbuss | 65 | extern long ErsatzKompass; |
66 | extern int ErsatzKompassInGrad; // Kompasswert in Grad |
||
1246 | killagreg | 67 | extern long HoehenWert; |
68 | extern long SollHoehe; |
||
1690 | holgerb | 69 | extern unsigned char CareFree; |
1153 | hbuss | 70 | extern int MesswertNick,MesswertRoll,MesswertGier; |
1643 | holgerb | 71 | extern int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch; |
72 | extern unsigned int NeutralAccX, NeutralAccY; |
||
1215 | hbuss | 73 | extern unsigned char HoehenReglerAktiv; |
1639 | holgerb | 74 | extern int NeutralAccZ; |
396 | hbuss | 75 | extern long Umschlag180Nick, Umschlag180Roll; |
492 | hbuss | 76 | extern signed int ExternStickNick,ExternStickRoll,ExternStickGier; |
513 | hbuss | 77 | extern unsigned char Parameter_UserParam1,Parameter_UserParam2,Parameter_UserParam3,Parameter_UserParam4,Parameter_UserParam5,Parameter_UserParam6,Parameter_UserParam7,Parameter_UserParam8; |
805 | hbuss | 78 | extern int NaviAccNick,NaviAccRoll,NaviCntAcc; |
871 | hbuss | 79 | extern unsigned int modell_fliegt; |
1639 | holgerb | 80 | extern void MotorRegler(void); |
81 | extern void SendMotorData(void); |
||
1622 | killagreg | 82 | //void CalibrierMittelwert(void); |
83 | //void Mittelwert(void); |
||
1639 | holgerb | 84 | extern void SetNeutral(unsigned char AccAdjustment); |
85 | extern void Piep(unsigned char Anzahl, unsigned int dauer); |
||
86 | extern void CopyDebugValues(void); |
||
1 | ingob | 87 | |
304 | ingob | 88 | extern unsigned char h,m,s; |
89 | extern volatile unsigned char Timeout ; |
||
90 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
||
1153 | hbuss | 91 | extern int DiffNick,DiffRoll; |
1377 | hbuss | 92 | //extern int Poti1, Poti2, Poti3, Poti4; |
304 | ingob | 93 | extern volatile unsigned char SenderOkay; |
94 | extern int StickNick,StickRoll,StickGier; |
||
95 | extern char MotorenEin; |
||
1403 | hbuss | 96 | extern unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5; |
1591 | holgerb | 97 | extern char VarioCharacter; |
1692 | holgerb | 98 | extern int HoverGas; |
1 | ingob | 99 | |
100 | extern unsigned char Parameter_Luftdruck_D; |
||
101 | extern unsigned char Parameter_MaxHoehe; |
||
102 | extern unsigned char Parameter_Hoehe_P; |
||
103 | extern unsigned char Parameter_Hoehe_ACC_Wirkung; |
||
104 | extern unsigned char Parameter_KompassWirkung; |
||
105 | extern unsigned char Parameter_Gyro_P; |
||
106 | extern unsigned char Parameter_Gyro_I; |
||
107 | extern unsigned char Parameter_Gier_P; |
||
108 | extern unsigned char Parameter_ServoNickControl; |
||
1232 | hbuss | 109 | extern unsigned char Parameter_ServoRollControl; |
396 | hbuss | 110 | extern unsigned char Parameter_AchsKopplung1; |
1120 | hbuss | 111 | extern unsigned char Parameter_AchsKopplung2; |
112 | //extern unsigned char Parameter_AchsGegenKopplung1; |
||
921 | hbuss | 113 | extern unsigned char Parameter_J16Bitmask; // for the J16 Output |
114 | extern unsigned char Parameter_J16Timing; // for the J16 Output |
||
115 | extern unsigned char Parameter_J17Bitmask; // for the J17 Output |
||
116 | extern unsigned char Parameter_J17Timing; // for the J17 Output |
||
1243 | killagreg | 117 | extern signed char MixerTable[MAX_MOTORS][4]; |
1 | ingob | 118 | #endif //_FC_H |
119 |