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