Rev 972 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 972 | Rev 973 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | Copyright 2008, by Michael Walter |
2 | Copyright 2008, by Michael Walter |
3 | 3 | ||
4 | All functions written by Michael Walter are free software and can be redistributed and/or modified under the terms of the GNU Lesser |
4 | All functions written by Michael Walter are free software and can be redistributed and/or modified under the terms of the GNU Lesser |
5 | General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but |
5 | General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but |
6 | WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
6 | WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
7 | See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public |
7 | See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public |
8 | License along with this program. If not, see <http://www.gnu.org/licenses/>. |
8 | License along with this program. If not, see <http://www.gnu.org/licenses/>. |
9 | 9 | ||
10 | Please note: The software is based on the framework provided by H. Buss and I. Busker in their Mikrokopter projekt. All functions that |
10 | Please note: The software is based on the framework provided by H. Buss and I. Busker in their Mikrokopter projekt. All functions that |
11 | are not written by Michael Walter are under the license by H. Buss and I. Busker (license_buss.txt) published by www.mikrokopter.de |
11 | are not written by Michael Walter are under the license by H. Buss and I. Busker (license_buss.txt) published by www.mikrokopter.de |
12 | unless it is stated otherwise. |
12 | unless it is stated otherwise. |
13 | */ |
13 | */ |
14 | 14 | ||
15 | /***************************************************************************** |
15 | /***************************************************************************** |
16 | Additional Defines |
16 | Additional Defines |
17 | **************************************************************************** */ |
17 | **************************************************************************** */ |
18 | //#define USE_COMPASS |
18 | //#define USE_COMPASS |
19 | //#define INTERNAL_REFERENCE |
19 | //#define INTERNAL_REFERENCE |
20 | //#define MELEXIS_GYRO |
20 | //#define MELEXIS_GYRO |
21 | //#define USE_OSD |
21 | //#define USE_OSD |
22 | //#define USE_GPS |
22 | //#define USE_GPS |
23 | //#define X_FORMATION |
23 | //#define X_FORMATION |
24 | 24 | ||
25 | extern int MesswertNick,MesswertRoll,MesswertGier; |
25 | extern int MesswertNick,MesswertRoll,MesswertGier; |
26 | extern int AdNeutralNick,AdNeutralRoll,AdNeutralGier; |
26 | extern float AdNeutralNick, AdNeutralRoll, AdNeutralGier; |
27 | extern int NeutralAccX, NeutralAccY, NeutralAccZ; |
27 | extern int NeutralAccX, NeutralAccY, NeutralAccZ; |
28 | extern int GierMischanteil,GasMischanteil; |
28 | extern int GierMischanteil,GasMischanteil; |
29 | 29 | ||
30 | extern int AverageRoll_X, AverageRoll_Y, AverageRoll_Z; |
30 | extern int AverageRoll, AverageNick, AverageGier; |
31 | extern int AveragerACC_X, AveragerACC_Y, AveragerACC_Z; |
31 | extern int AveragerACC_X, AveragerACC_Y, AveragerACC_Z; |
32 | 32 | ||
33 | extern int DiffNick,DiffRoll; |
33 | extern int DiffNick,DiffRoll; |
34 | extern unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count; |
34 | extern unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count; |
35 | extern unsigned char MotorWert[5]; |
35 | extern unsigned char MotorWert[5]; |
36 | extern unsigned char SenderOkay; |
36 | extern unsigned char SenderOkay; |
37 | extern int StickNick,StickRoll,StickGier; |
37 | extern int StickNick,StickRoll,StickGier; |
38 | 38 | ||
39 | void GetMeasurements(void); |
39 | void GetMeasurements(void); |
40 | void GetRadioValues(void); |
40 | void GetRadioValues(void); |
41 | void SendMotorData(void); |
41 | void SendMotorData(void); |
42 | void PID_Regler(void); |
42 | void PID_Regler(void); |
43 | void SetNeutral(void); |
43 | void SetNeutral(void); |
44 | 44 | ||
45 | 45 | ||
46 | 46 |