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 |
||
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 | |
1377 | hbuss | 21 | #define Poti1 Poti[0] |
22 | #define Poti2 Poti[1] |
||
23 | #define Poti3 Poti[2] |
||
24 | #define Poti4 Poti[3] |
||
25 | #define Poti5 Poti[4] |
||
26 | #define Poti6 Poti[5] |
||
27 | #define Poti7 Poti[6] |
||
28 | #define Poti8 Poti[7] |
||
1254 | killagreg | 29 | |
1420 | killagreg | 30 | extern volatile unsigned char FCFlags; |
1 | ingob | 31 | extern unsigned char Sekunde,Minute; |
1352 | hbuss | 32 | extern unsigned int BaroExpandActive; |
693 | hbuss | 33 | extern long IntegralNick,IntegralNick2; |
34 | extern long IntegralRoll,IntegralRoll2; |
||
1153 | hbuss | 35 | //extern int IntegralNick,IntegralNick2; |
36 | //extern int IntegralRoll,IntegralRoll2; |
||
1420 | killagreg | 37 | extern unsigned char Poti[9]; |
1153 | hbuss | 38 | |
693 | hbuss | 39 | extern long Mess_IntegralNick,Mess_IntegralNick2; |
40 | extern long Mess_IntegralRoll,Mess_IntegralRoll2; |
||
41 | extern long IntegralAccNick,IntegralAccRoll; |
||
1 | ingob | 42 | extern volatile long Mess_Integral_Hoch; |
693 | hbuss | 43 | extern long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2; |
1153 | hbuss | 44 | extern int KompassValue; |
45 | extern int KompassStartwert; |
||
46 | extern int KompassRichtung; |
||
1664 | holgerb | 47 | extern unsigned char ControlHeading; |
1166 | hbuss | 48 | extern int TrimNick, TrimRoll; |
717 | hbuss | 49 | extern long ErsatzKompass; |
50 | extern int ErsatzKompassInGrad; // Kompasswert in Grad |
||
1246 | killagreg | 51 | extern long HoehenWert; |
52 | extern long SollHoehe; |
||
1153 | hbuss | 53 | extern int MesswertNick,MesswertRoll,MesswertGier; |
1643 | holgerb | 54 | extern int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch; |
55 | extern unsigned int NeutralAccX, NeutralAccY; |
||
1215 | hbuss | 56 | extern unsigned char HoehenReglerAktiv; |
1639 | holgerb | 57 | extern int NeutralAccZ; |
396 | hbuss | 58 | extern long Umschlag180Nick, Umschlag180Roll; |
492 | hbuss | 59 | extern signed int ExternStickNick,ExternStickRoll,ExternStickGier; |
513 | hbuss | 60 | extern unsigned char Parameter_UserParam1,Parameter_UserParam2,Parameter_UserParam3,Parameter_UserParam4,Parameter_UserParam5,Parameter_UserParam6,Parameter_UserParam7,Parameter_UserParam8; |
805 | hbuss | 61 | extern int NaviAccNick,NaviAccRoll,NaviCntAcc; |
871 | hbuss | 62 | extern unsigned int modell_fliegt; |
1639 | holgerb | 63 | extern void MotorRegler(void); |
64 | extern void SendMotorData(void); |
||
1622 | killagreg | 65 | //void CalibrierMittelwert(void); |
66 | //void Mittelwert(void); |
||
1639 | holgerb | 67 | extern void SetNeutral(unsigned char AccAdjustment); |
68 | extern void Piep(unsigned char Anzahl, unsigned int dauer); |
||
69 | extern void CopyDebugValues(void); |
||
1 | ingob | 70 | |
304 | ingob | 71 | extern unsigned char h,m,s; |
72 | extern volatile unsigned char Timeout ; |
||
73 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
||
1153 | hbuss | 74 | extern int DiffNick,DiffRoll; |
1377 | hbuss | 75 | //extern int Poti1, Poti2, Poti3, Poti4; |
304 | ingob | 76 | extern volatile unsigned char SenderOkay; |
77 | extern int StickNick,StickRoll,StickGier; |
||
78 | extern char MotorenEin; |
||
1403 | hbuss | 79 | extern unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5; |
1591 | holgerb | 80 | extern char VarioCharacter; |
1 | ingob | 81 | |
82 | extern unsigned char Parameter_Luftdruck_D; |
||
83 | extern unsigned char Parameter_MaxHoehe; |
||
84 | extern unsigned char Parameter_Hoehe_P; |
||
85 | extern unsigned char Parameter_Hoehe_ACC_Wirkung; |
||
86 | extern unsigned char Parameter_KompassWirkung; |
||
87 | extern unsigned char Parameter_Gyro_P; |
||
88 | extern unsigned char Parameter_Gyro_I; |
||
89 | extern unsigned char Parameter_Gier_P; |
||
90 | extern unsigned char Parameter_ServoNickControl; |
||
1232 | hbuss | 91 | extern unsigned char Parameter_ServoRollControl; |
396 | hbuss | 92 | extern unsigned char Parameter_AchsKopplung1; |
1120 | hbuss | 93 | extern unsigned char Parameter_AchsKopplung2; |
94 | //extern unsigned char Parameter_AchsGegenKopplung1; |
||
921 | hbuss | 95 | extern unsigned char Parameter_J16Bitmask; // for the J16 Output |
96 | extern unsigned char Parameter_J16Timing; // for the J16 Output |
||
97 | extern unsigned char Parameter_J17Bitmask; // for the J17 Output |
||
98 | extern unsigned char Parameter_J17Timing; // for the J17 Output |
||
1243 | killagreg | 99 | extern signed char MixerTable[MAX_MOTORS][4]; |
1 | ingob | 100 | #endif //_FC_H |
101 |