Rev 24 | Rev 51 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 41 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | // + Copyright (c) 2008 Ingo Busker, Holger Buss |
5 | // + Copyright (c) 2008 Ingo Busker, Holger Buss |
6 | // + Nur für den privaten Gebrauch |
6 | // + Nur für den privaten Gebrauch |
7 | // + FOR NON COMMERCIAL USE ONLY |
7 | // + FOR NON COMMERCIAL USE ONLY |
8 | // + www.MikroKopter.com |
8 | // + www.MikroKopter.com |
9 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
9 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
10 | // + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), |
10 | // + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), |
11 | // + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. |
11 | // + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. |
12 | // + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
12 | // + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
13 | // + bzgl. der Nutzungsbedingungen aufzunehmen. |
13 | // + bzgl. der Nutzungsbedingungen aufzunehmen. |
14 | // + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
14 | // + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
15 | // + Verkauf von Luftbildaufnahmen, usw. |
15 | // + Verkauf von Luftbildaufnahmen, usw. |
16 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
16 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
17 | // + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
17 | // + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
18 | // + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
18 | // + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
19 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
19 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
20 | // + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
20 | // + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
21 | // + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de" |
21 | // + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de" |
22 | // + eindeutig als Ursprung verlinkt werden |
22 | // + eindeutig als Ursprung verlinkt werden |
23 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
23 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
24 | // + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
24 | // + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
25 | // + Benutzung auf eigene Gefahr |
25 | // + Benutzung auf eigene Gefahr |
26 | // + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
26 | // + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
27 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
27 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
28 | // + Die PORTIERUNG der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
28 | // + Die PORTIERUNG der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
29 | // + mit unserer Zustimmung zulässig |
29 | // + mit unserer Zustimmung zulässig |
30 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
30 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
31 | // + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
31 | // + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
32 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
32 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
33 | // + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
33 | // + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
34 | // + this list of conditions and the following disclaimer. |
34 | // + this list of conditions and the following disclaimer. |
35 | // + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived |
35 | // + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived |
36 | // + from this software without specific prior written permission. |
36 | // + from this software without specific prior written permission. |
37 | // + * The use of this project (hardware, software, binary files, sources and documentation) is only permitted |
37 | // + * The use of this project (hardware, software, binary files, sources and documentation) is only permitted |
38 | // + for non-commercial use (directly or indirectly) |
38 | // + for non-commercial use (directly or indirectly) |
39 | // + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
39 | // + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
40 | // + with our written permission |
40 | // + with our written permission |
41 | // + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
41 | // + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
42 | // + clearly linked as origin |
42 | // + clearly linked as origin |
43 | // + * PORTING this software (or part of it) to systems (other than hardware from www.mikrokopter.de) is NOT allowed |
43 | // + * PORTING this software (or part of it) to systems (other than hardware from www.mikrokopter.de) is NOT allowed |
44 | // |
44 | // |
45 | // + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
45 | // + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
46 | // + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
46 | // + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
47 | // + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
47 | // + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
Line 50... | Line 50... | ||
50 | // + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
50 | // + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
51 | // + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
51 | // + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
52 | // + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
52 | // + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
53 | // + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
53 | // + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
54 | // + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
54 | // + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
55 | // + POSSIBILITY OF SUCH DAMAGE. |
55 | // + POSSIBILITY OF SUCH DAMAGE. |
56 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
56 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
- | 57 | #include <stdlib.h> |
|
- | 58 | #include "91x_lib.h" |
|
- | 59 | #include "printf_P.h" |
|
57 | #include "main.h" |
60 | #include "main.h" |
- | 61 | #include "ubx.h" |
|
- | 62 | #include "GPS.h" |
|
- | 63 | #include "timer.h" |
|
- | 64 | #include "i2c.h" |
|
- | 65 | #include "spi_slave.h" |
|
- | 66 | #include "menu.h" |
|
- | 67 | #include "uart1.h" |
|
Line 58... | Line -... | ||
58 | - | ||
59 | u16 TestInt = 0; |
- | |
60 | #define ARRAYGROESSE 10 |
- | |
61 | u8 Array[ARRAYGROESSE] = {1,2,3,4,5,6,7,8,9,10}; |
68 | |
62 | s8 DisplayBuff[80] = "Hallo Welt"; |
69 | s8 DisplayBuff[DISPLAYBUFFSIZE] = "Hello World"; |
- | 70 | u8 DispPtr = 0; |
|
- | 71 | ||
- | 72 | u8 MenuItem = 0; |
|
63 | u8 DispPtr = 0; |
73 | u8 MaxMenuItem = 12; |
Line 64... | Line 74... | ||
64 | u8 RemoteTasten = 0; |
74 | u8 RemoteKeys = 0; |
65 | 75 | ||
66 | #define KEY1 0x01 |
76 | #define KEY1 0x01 |
67 | #define KEY2 0x02 |
77 | #define KEY2 0x02 |
68 | #define KEY3 0x04 |
78 | #define KEY3 0x04 |
Line -... | Line 79... | ||
- | 79 | #define KEY4 0x08 |
|
- | 80 | #define KEY5 0x10 |
|
- | 81 | ||
69 | #define KEY4 0x08 |
82 | /************************************/ |
70 | #define KEY5 0x10 |
83 | /* Clear LCD Buffer */ |
71 | 84 | /************************************/ |
|
72 | void LcdClear(void) |
85 | void LCD_Clear(void) |
73 | { |
86 | { |
Line -... | Line 87... | ||
- | 87 | u8 i; |
|
- | 88 | for( i = 0; i < DISPLAYBUFFSIZE; i++) DisplayBuff[i] = ' '; |
|
- | 89 | } |
|
- | 90 | ||
- | 91 | ||
74 | u8 i; |
92 | /************************************/ |
75 | for(i=0;i<80;i++) DisplayBuff[i] = ' '; |
93 | /* Update Menu on LCD */ |
76 | } |
- | |
77 | 94 | /************************************/ |
|
- | 95 | // Display with 20 characters in 4 lines |
|
- | 96 | void LCD_PrintMenu(void) |
|
- | 97 | { |
|
78 | void Menu(void) |
98 | s32 i1,i2; |
- | 99 | if(RemoteKeys & KEY1) { if(MenuItem) MenuItem--; else MenuItem = MaxMenuItem;} |
|
79 | { |
100 | if(RemoteKeys & KEY2) { if(MenuItem == MaxMenuItem) MenuItem = 0; else MenuItem++;} |
80 | static u8 MaxMenue = 1,MenuePunkt=0; |
101 | if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuItem = 0; |
- | 102 | ||
- | 103 | LCD_Clear(); |
|
81 | u8 text[20]; |
104 | if(MenuItem > MaxMenuItem) MenuItem = MaxMenuItem; |
- | 105 | // print menu item number in the upper right corner |
|
- | 106 | if(MenuItem < 10) |
|
- | 107 | { |
|
82 | 108 | LCD_printfxy(17,0,"[%i]",MenuItem); |
|
- | 109 | } |
|
- | 110 | else |
|
83 | if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); } |
111 | { |
84 | if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); } |
112 | LCD_printfxy(16,0,"[%i]",MenuItem); |
- | 113 | } |
|
85 | if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0; |
114 | |
86 | LCD_printfxy(17,0,"[%i]",MenuePunkt); |
115 | switch(MenuItem) |
87 | switch(MenuePunkt) |
116 | { |
- | 117 | // Version Info |
|
88 | { |
118 | case 0: |
89 | case 0: |
119 | LCD_printfxy(0,0,"++ Navi-Ctrl ++"); |
- | 120 | LCD_printfxy(0,1," V%d.%d%c ", VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH); |
|
- | 121 | if(ErrorCode) LCD_printfxy(11,1," Err:%d",ErrorCode) else LCD_printfxy(11,1," "); |
|
- | 122 | LCD_printfxy(0,2,"%s",ErrorMSG); |
|
- | 123 | LCD_printfxy(0,3,"(c) Buss, Busker"); |
|
- | 124 | break; |
|
- | 125 | case 1: |
|
90 | LCD_printfxy(0,0,"++ Navi-Ctrl ++"); |
126 | if (GPSData.Status == INVALID) |
91 | LCD_printfxy(0,1,"SW:%d.%d",VERSION_HAUPTVERSION, VERSION_NEBENVERSION); |
127 | { |
- | 128 | LCD_printfxy(0,0,"No GPS data"); |
|
- | 129 | LCD_printfxy(0,1,"Lon: "); |
|
- | 130 | LCD_printfxy(0,2,"Lat: "); |
|
- | 131 | LCD_printfxy(0,3,"Alt: "); |
|
- | 132 | } |
|
- | 133 | else // newdata or processed |
|
- | 134 | { |
|
92 | // LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber()); |
135 | switch (GPSData.SatFix) |
- | 136 | { |
|
- | 137 | case SATFIX_NONE: |
|
- | 138 | LCD_printfxy(0,0,"Sats:%02d Fix:None", GPSData.NumOfSats); |
|
- | 139 | break; |
|
- | 140 | case SATFIX_2D: |
|
- | 141 | LCD_printfxy(0,0,"Sats:%02d Fix:2D ", GPSData.NumOfSats); |
|
- | 142 | break; |
|
- | 143 | case SATFIX_3D: |
|
- | 144 | LCD_printfxy(0,0,"Sats:%02d Fix:3D ", GPSData.NumOfSats); |
|
- | 145 | break; |
|
- | 146 | default: |
|
- | 147 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
|
- | 148 | break; |
|
- | 149 | } |
|
- | 150 | i1 = GPSData.Position.Longitude/10000000L; |
|
- | 151 | i2 = abs(GPSData.Position.Longitude%10000000L); |
|
- | 152 | LCD_printfxy(0,1,"Lon:%+3ld.%07ld deg",i1, i2); |
|
- | 153 | i1 = GPSData.Position.Latitude/10000000L; |
|
- | 154 | i2 = abs(GPSData.Position.Latitude%10000000L); |
|
- | 155 | LCD_printfxy(0,2,"Lat:%+3ld.%07ld deg",i1, i2); |
|
- | 156 | i1 = GPSData.Position.Altitude/1000L; |
|
- | 157 | i2 = abs(GPSData.Position.Altitude%1000L); |
|
- | 158 | LCD_printfxy(0,3,"Alt:%4ld.%03ld m",i1, i2); |
|
- | 159 | } |
|
- | 160 | break; |
|
- | 161 | case 2: |
|
- | 162 | if (GPSData.Status == INVALID) |
|
- | 163 | { |
|
- | 164 | LCD_printfxy(0,0,"No GPS data"); |
|
- | 165 | LCD_printfxy(0,1,"Speed N: "); |
|
- | 166 | LCD_printfxy(0,2,"Speed E: "); |
|
- | 167 | LCD_printfxy(0,3,"Speed T: "); |
|
- | 168 | } |
|
- | 169 | else // newdata or processed |
|
- | 170 | { |
|
- | 171 | switch (GPSData.SatFix) |
|
- | 172 | { |
|
- | 173 | case SATFIX_NONE: |
|
- | 174 | LCD_printfxy(0,0,"Sats:%02d Fix:None", GPSData.NumOfSats); |
|
- | 175 | break; |
|
- | 176 | case SATFIX_2D: |
|
- | 177 | LCD_printfxy(0,0,"Sats:%02d Fix:2D ", GPSData.NumOfSats); |
|
- | 178 | break; |
|
- | 179 | case SATFIX_3D: |
|
- | 180 | LCD_printfxy(0,0,"Sats:%02d Fix:3D ", GPSData.NumOfSats); |
|
- | 181 | break; |
|
- | 182 | default: |
|
- | 183 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
|
- | 184 | break; |
|
- | 185 | } |
|
- | 186 | LCD_printfxy(0,1,"Speed N: %+4ld cm/s",GPSData.Speed_North); |
|
- | 187 | LCD_printfxy(0,2,"Speed E: %+4ld cm/s",GPSData.Speed_East); |
|
- | 188 | LCD_printfxy(0,3,"Speed T: %+4ld cm/s",GPSData.Speed_Top); |
|
- | 189 | } |
|
- | 190 | break; |
|
- | 191 | case 3: |
|
- | 192 | LCD_printfxy(0,0,"GPS UTC Time"); |
|
- | 193 | if (!SystemTime.Valid) |
|
- | 194 | { |
|
- | 195 | LCD_printfxy(0,0,"GPS UTC Time"); |
|
- | 196 | LCD_printfxy(0,1," "); |
|
- | 197 | LCD_printfxy(0,2," No time data! "); |
|
- | 198 | LCD_printfxy(0,3," "); |
|
- | 199 | } |
|
- | 200 | else // newdata or processed |
|
93 | LCD_printfxy(0,3,"(c) I.B. H.B. "); |
201 | { |
- | 202 | LCD_printfxy(0,1," "); |
|
- | 203 | LCD_printfxy(0,2,"Date: %02i/%02i/%04i",SystemTime.Month, SystemTime.Day, SystemTime.Year); |
|
- | 204 | LCD_printfxy(0,3,"Time: %02i:%02i:%02i.%03i", SystemTime.Hour, SystemTime.Min, SystemTime.Sec, SystemTime.mSec); |
|
- | 205 | ||
- | 206 | } |
|
- | 207 | break; |
|
- | 208 | case 4: // Navi Params from FC |
|
- | 209 | LCD_printfxy(0,0,"NaviMode: %3i" , Parameter.NaviGpsModeControl); |
|
94 | // if(RemoteTasten & KEY3) TestInt--; |
210 | LCD_printfxy(0,1,"G :%3i P :%3i ",Parameter.NaviGpsGain, Parameter.NaviGpsP); |
95 | // if(RemoteTasten & KEY4) TestInt++; |
211 | LCD_printfxy(0,2,"I :%3i D :%3i ",Parameter.NaviGpsI, Parameter.NaviGpsD); |
- | 212 | LCD_printfxy(0,3,"ACC:%3i SAT:%3i ",Parameter.NaviGpsACC, Parameter.NaviGpsMinSat); |
|
- | 213 | break; |
|
- | 214 | case 5: |
|
- | 215 | LCD_printfxy(0,0,"Home Position"); |
|
- | 216 | if(GPS_HomePosition.Status == INVALID) |
|
- | 217 | { |
|
- | 218 | LCD_printfxy(0,1," "); |
|
- | 219 | LCD_printfxy(0,2," Is not set. "); |
|
- | 220 | LCD_printfxy(0,3," "); |
|
- | 221 | } |
|
- | 222 | else |
|
- | 223 | { |
|
- | 224 | i1 = GPS_HomePosition.Longitude/10000000L; |
|
96 | break; |
225 | i2 = abs(GPS_HomePosition.Longitude%10000000L); |
- | 226 | LCD_printfxy(0,1,"Lon: %3ld.%07ld deg",i1, i2); |
|
- | 227 | i1 = GPS_HomePosition.Latitude/10000000L; |
|
- | 228 | i2 = abs(GPS_HomePosition.Latitude%10000000L); |
|
- | 229 | LCD_printfxy(0,2,"Lat: %3ld.%07ld deg",i1, i2); |
|
- | 230 | i1 = GPS_HomePosition.Altitude/1000L; |
|
- | 231 | i2 = abs(GPS_HomePosition.Altitude%1000L); |
|
97 | 232 | LCD_printfxy(0,3,"Alt:%4ld.%03ld m",i1, i2); |
|
- | 233 | } |
|
98 | case 1: |
234 | break; |
- | 235 | case 6: // RC stick controls from FC |
|
- | 236 | LCD_printfxy(0,0,"RC-Sticks" ); |
|
99 | LCD_printfxy(0,0,"++ GPS-Logging ++"); |
237 | LCD_printfxy(0,1,"Ni:%4i Ro:%4i ",FC.StickNick, FC.StickRoll); |
- | 238 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",FC.StickGas, FC.StickYaw); |
|
- | 239 | break; |
|
- | 240 | case 7: // RC poti controls from FC |
|
- | 241 | LCD_printfxy(0,0,"RC-Potis" ); |
|
- | 242 | LCD_printfxy(0,1,"Po1:%3i Po2:%3i ",FC.Poti1, FC.Poti2); |
|
- | 243 | LCD_printfxy(0,2,"Po3:%3i Po4:%3i ",FC.Poti3, FC.Poti4); |
|
- | 244 | break; |
|
- | 245 | case 8: // attitude from FC |
|
- | 246 | LCD_printfxy(0,0,"IntNick: %5i", FromFlightCtrl.IntegralNick); |
|
- | 247 | LCD_printfxy(0,1,"IntRoll: %5i", FromFlightCtrl.IntegralRoll); |
|
- | 248 | LCD_printfxy(0,2,"AccNick: %5i", FromFlightCtrl.AccNick); |
|
- | 249 | LCD_printfxy(0,3,"AccRoll: %5i", FromFlightCtrl.AccRoll); |
|
100 | sprintf(text, "latitude: %u",GPS_Data.Latitude); |
250 | break; |
- | 251 | case 9: // gyros from FC |
|
- | 252 | LCD_printfxy(0,0,"GyroNick: %4i", FromFlightCtrl.GyroNick); |
|
101 | LCD_printfxy(0,1,text); |
253 | LCD_printfxy(0,1,"GyroRoll: %4i", FromFlightCtrl.GyroRoll); |
- | 254 | LCD_printfxy(0,2,"GyroYaw: %4i", FromFlightCtrl.GyroYaw); |
|
- | 255 | break; |
|
- | 256 | case 10: // Remote Control Level from FC |
|
102 | sprintf(text, "longitude:%u",GPS_Data.Longitude); |
257 | LCD_printfxy(0,0,"RC-Level: %3i", FC.RC_Quality); |
- | 258 | LCD_printfxy(0,1,"Ubat: %3i", FC.UBat); |
|
- | 259 | LCD_printfxy(0,2,"CompHeading: %3i", I2C_Heading.Heading); |
|
- | 260 | LCD_printfxy(0,3,"GyroHeading: %3i", FromFlightCtrl.GyroHeading); |
|
- | 261 | break; |
|
- | 262 | case 11: // User Parameter |
|
- | 263 | LCD_printfxy(0,0,"UP1:%3i UP2:%3i ",Parameter.User1,Parameter.User2); |
|
- | 264 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i ",Parameter.User3,Parameter.User4); |
|
- | 265 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i ",Parameter.User5,Parameter.User6); |
|
- | 266 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i ",Parameter.User7,Parameter.User8); |
|
- | 267 | break; |
|
- | 268 | case 12: // MK3MAG |
|
- | 269 | I2C1_SendCommand(I2C_CMD_READ_MAG); |
|
103 | LCD_printfxy(0,2,text); |
270 | LCD_printfxy(0,0,"MK3MAG V%i.%i%c",MK3MAG_Version.Major, MK3MAG_Version.Minor, 'a'+ MK3MAG_Version.Patch); |
- | 271 | LCD_printfxy(0,1,"MagX: %4i ",I2C_Mag.MagX); |
|
104 | sprintf(text, "used sat: %d",GPS_Data.Used_Sat); |
272 | LCD_printfxy(0,2,"MagY: %4i ",I2C_Mag.MagY); |
105 | LCD_printfxy(0,3,text); |
273 | LCD_printfxy(0,3,"MagZ: %4i ",I2C_Mag.MagZ); |
106 | break; |
274 | break; |
107 | 275 | default: |
|
108 | default: MaxMenue = MenuePunkt - 1; |
276 | MaxMenuItem = MenuItem - 1; |
109 | MenuePunkt = 0; |
277 | MenuItem = 0; |