Subversion Repositories MK3Mag

Rev

Rev 3 | Rev 7 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line -... Line 1...
-
 
1
/*#######################################################################################
-
 
2
Flight Control
-
 
3
#######################################################################################*/
-
 
4
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
5
// + Copyright (c) 04.2007 Holger Buss
-
 
6
// + Nur für den privaten Gebrauch
-
 
7
// + www.MikroKopter.com
-
 
8
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
9
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), 
-
 
10
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. 
-
 
11
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt 
-
 
12
// + bzgl. der Nutzungsbedingungen aufzunehmen. 
-
 
13
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
-
 
14
// + Verkauf von Luftbildaufnahmen, usw.
-
 
15
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
16
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, 
-
 
17
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
-
 
18
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
19
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
-
 
20
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
-
 
21
// + eindeutig als Ursprung verlinkt werden
-
 
22
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
23
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
-
 
24
// + Benutzung auf eigene Gefahr
-
 
25
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
-
 
26
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
27
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur 
-
 
28
// + mit unserer Zustimmung zulässig
-
 
29
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
30
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
-
 
31
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
32
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, 
-
 
33
// + this list of conditions and the following disclaimer.
-
 
34
// +   * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
-
 
35
// +     from this software without specific prior written permission.
-
 
36
// +   * The use of this project (hardware, software, binary files, sources and documentation) is only permittet 
-
 
37
// +     for non-commercial use (directly or indirectly)
-
 
38
// +     Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted 
-
 
39
// +     with our written permission
-
 
40
// +   * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be 
-
 
41
// +     clearly linked as origin // +   * porting to systems other than hardware from www.mikrokopter.de is not allowed
-
 
42
// +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-
 
43
// +  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
 
44
// +  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-
 
45
// +  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-
 
46
// +  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-
 
47
// +  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-
 
48
// +  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-
 
49
// +  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// +  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-
 
50
// +  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
 
51
// +  POSSIBILITY OF SUCH DAMAGE. 
-
 
52
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
53
 
1
 signed int OffsetN, OffsetR, OffsetZ;
54
 signed int OffsetN, OffsetR, OffsetZ;
2
/*
55
/*
3
 signed int CalTabelleHorizontalN[4] = {67,-450,77,-411};    // Vier Messwerte 90° Horizontal gedreht
56
 signed int CalTabelleHorizontalN[4] = {67,-450,77,-411};    // Vier Messwerte 90° Horizontal gedreht
4
 signed int CalTabelleHorizontalR[4] = {-310,175,183,-333};  
57
 signed int CalTabelleHorizontalR[4] = {-310,175,183,-333};  
5
 signed int CalTabelleHorizontalZ[4] = {-100,-390,-400,100}; // Messwinkel des Z-Sensors auch horizontal gemessen
58
 signed int CalTabelleHorizontalZ[4] = {-100,-390,-400,100}; // Messwinkel des Z-Sensors auch horizontal gemessen
Line 145... Line 198...
145
         DebugOut.Analog[5] = RawMagnet3a;
198
         DebugOut.Analog[5] = RawMagnet3a;
146
         DebugOut.Analog[6] = RawMagnet3b;*/
199
         DebugOut.Analog[6] = RawMagnet3b;*/
147
         DebugOut.Analog[6] = WinkelOut.Winkel[0];
200
         DebugOut.Analog[6] = WinkelOut.Winkel[0];
148
         DebugOut.Analog[7] = WinkelOut.Winkel[1];
201
         DebugOut.Analog[7] = WinkelOut.Winkel[1];
Line -... Line 202...
-
 
202
 
-
 
203
         DebugOut.Analog[8] =  WinkelOut.UserParameter[0];
-
 
204
         DebugOut.Analog[9] =  WinkelOut.UserParameter[1];
-
 
205
         DebugOut.Analog[10] = WinkelOut.UserParameter[2];
-
 
206
         DebugOut.Analog[11] = WinkelOut.UserParameter[3];
-
 
207
 
149
 
208
 
150
         CalcHeading();
209
         CalcHeading();
151
         BearbeiteRxDaten();
210
         BearbeiteRxDaten();
152
         PC_Connected = 100;
211
         PC_Connected = 100;
153
         if(PC_Connected)
212
         if(PC_Connected)