Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | /*#######################################################################################*/ |
2 | /* !!! THIS IS NOT FREE SOFTWARE !!! */ |
||
3 | /*#######################################################################################*/ |
||
4 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
5 | // + Copyright (c) 2008 Ingo Busker, Holger Buss |
||
171 | ingob | 6 | // + Nur für den privaten Gebrauch / NON-COMMERCIAL USE ONLY |
1 | ingob | 7 | // + FOR NON COMMERCIAL USE ONLY |
8 | // + www.MikroKopter.com |
||
9 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
41 | ingob | 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. |
||
12 | // + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
||
13 | // + bzgl. der Nutzungsbedingungen aufzunehmen. |
||
1 | ingob | 14 | // + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
15 | // + Verkauf von Luftbildaufnahmen, usw. |
||
16 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
41 | ingob | 17 | // + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
1 | ingob | 18 | // + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
19 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
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" |
||
22 | // + eindeutig als Ursprung verlinkt werden |
||
23 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
24 | // + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
||
25 | // + Benutzung auf eigene Gefahr |
||
26 | // + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
||
27 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
171 | ingob | 28 | // + Die Portierung oder Nutzung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
1 | ingob | 29 | // + mit unserer Zustimmung zulässig |
30 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
31 | // + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
||
32 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
41 | ingob | 33 | // + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
1 | ingob | 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 |
||
36 | // + from this software without specific prior written permission. |
||
41 | ingob | 37 | // + * The use of this project (hardware, software, binary files, sources and documentation) is only permitted |
1 | ingob | 38 | // + for non-commercial use (directly or indirectly) |
41 | ingob | 39 | // + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
1 | ingob | 40 | // + with our written permission |
41 | ingob | 41 | // + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
42 | // + clearly linked as origin |
||
171 | ingob | 43 | // + * porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed |
1 | ingob | 44 | // |
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 |
||
47 | // + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
||
48 | // + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
||
49 | // + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
||
50 | // + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
||
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 |
||
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 |
||
41 | ingob | 55 | // + POSSIBILITY OF SUCH DAMAGE. |
1 | ingob | 56 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
41 | ingob | 57 | #include <stdlib.h> |
58 | #include "91x_lib.h" |
||
1 | ingob | 59 | #include "main.h" |
264 | killagreg | 60 | #include "led.h" |
41 | ingob | 61 | #include "ubx.h" |
62 | #include "GPS.h" |
||
119 | killagreg | 63 | #include "timer1.h" |
242 | killagreg | 64 | #include "compass.h" |
41 | ingob | 65 | #include "spi_slave.h" |
66 | #include "menu.h" |
||
708 | holgerb | 67 | #include "uart0.h" |
41 | ingob | 68 | #include "uart1.h" |
267 | holgerb | 69 | #include "ncmag.h" |
380 | holgerb | 70 | #include "logging.h" |
426 | holgerb | 71 | #include "settings.h" |
548 | holgerb | 72 | #include "sdc.h" |
677 | holgerb | 73 | #include "analog.h" |
697 | holgerb | 74 | #include "canbus.h" |
708 | holgerb | 75 | #include "triggerlog.h" |
724 | holgerb | 76 | #include "CamCtrl.h" |
1 | ingob | 77 | |
78 | u8 DispPtr = 0; |
||
201 | killagreg | 79 | s8 DisplayBuff[DISPLAYBUFFSIZE]; |
1 | ingob | 80 | |
201 | killagreg | 81 | |
41 | ingob | 82 | u8 MenuItem = 0; |
724 | holgerb | 83 | u8 MaxMenuItem = 30; |
41 | ingob | 84 | |
203 | killagreg | 85 | void Menu_Putchar(char c) |
86 | { |
||
516 | holgerb | 87 | if(DispPtr < DISPLAYBUFFSIZE) DisplayBuff[DispPtr++] = c; ; |
203 | killagreg | 88 | } |
89 | |||
201 | killagreg | 90 | void Menu_Clear(void) |
1 | ingob | 91 | { |
201 | killagreg | 92 | u8 i; |
93 | for( i = 0; i < DISPLAYBUFFSIZE; i++) DisplayBuff[i] = ' '; |
||
1 | ingob | 94 | } |
95 | |||
41 | ingob | 96 | // Display with 20 characters in 4 lines |
201 | killagreg | 97 | void Menu_Update(u8 Keys) |
41 | ingob | 98 | { |
516 | holgerb | 99 | s32 i1,i2; |
51 | killagreg | 100 | u8 sign; |
41 | ingob | 101 | |
201 | killagreg | 102 | if(Keys & KEY1) { if(MenuItem > 0) MenuItem--; else MenuItem = MaxMenuItem;} |
103 | if(Keys & KEY2) { if(MenuItem == MaxMenuItem) MenuItem = 0; else MenuItem++;} |
||
104 | if((Keys & KEY1) && (Keys & KEY2)) MenuItem = 0; |
||
41 | ingob | 105 | if(MenuItem > MaxMenuItem) MenuItem = MaxMenuItem; |
201 | killagreg | 106 | Menu_Clear(); |
41 | ingob | 107 | // print menu item number in the upper right corner |
516 | holgerb | 108 | if(MenuItem < 10) |
109 | { |
||
41 | ingob | 110 | LCD_printfxy(17,0,"[%i]",MenuItem); |
111 | } |
||
201 | killagreg | 112 | else // Menuitem >= 10 |
41 | ingob | 113 | { |
114 | LCD_printfxy(16,0,"[%i]",MenuItem); |
||
115 | } |
||
116 | |||
516 | holgerb | 117 | switch(MenuItem) |
118 | { |
||
41 | ingob | 119 | // Version Info |
120 | case 0: |
||
708 | holgerb | 121 | if(IamMaster == SLAVE) LCD_printfxy(0,0,"+ Navi-Ctrl (S) +") |
122 | else |
||
123 | if(IamMaster == MASTER)LCD_printfxy(0,0,"+ Navi-Ctrl (M) +") |
||
124 | else LCD_printfxy(0,0,"++ Navi-Ctrl ++") |
||
125 | |||
530 | holgerb | 126 | LCD_printfxy(0,1,"HW V%d.%d SW V%d.%02d%c", UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH); |
617 | holgerb | 127 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) LCD_printfxy(19,1,"R"); |
516 | holgerb | 128 | if(ErrorCode) |
264 | killagreg | 129 | { |
130 | LCD_printfxy(0,2,"Error: %d",ErrorCode); |
||
516 | holgerb | 131 | LCD_printfxy(0,3,"%s",ErrorMSG); |
264 | killagreg | 132 | } |
489 | killagreg | 133 | else |
697 | holgerb | 134 | if(Partner.ErrorCode) |
489 | killagreg | 135 | { |
697 | holgerb | 136 | if(IamMaster == SLAVE) LCD_printfxy(0,2,"Master Err: %d",Partner.ErrorCode) |
137 | else LCD_printfxy(0,2,"Slave Err: %d",Partner.ErrorCode); |
||
138 | LCD_printfxy(0,3,"%s",PartnerErrorMSG); |
||
139 | } |
||
140 | else |
||
141 | { |
||
693 | holgerb | 142 | LCD_printfxy(0,2,"Set:%d %s", Parameter.ActiveSetting,EE_Parameter.Name); |
143 | LCD_printfxy(0,3,"%s",ErrorMSG); |
||
144 | // LCD_printfxy(0,3,"(c) HiSystems GmbH"); |
||
321 | holgerb | 145 | } |
574 | holgerb | 146 | if(FC.StatusFlags3 & FC_STATUS3_BOAT) LCD_printfxy(16,2,"BOAT"); |
41 | ingob | 147 | break; |
148 | case 1: |
||
697 | holgerb | 149 | if(IamMaster == SLAVE) LCD_printfxy(0,0,"++ Master - NC ++") |
150 | else LCD_printfxy(0,0,"++ Slave - NC ++"); |
||
151 | |||
152 | if(CanRxMessage[CAN_ID_VERSION].D.Byte[3]) |
||
153 | { |
||
154 | LCD_printfxy(0,1,"HW V%d.%d SW V%d.%02d%c", CanRxMessage[CAN_ID_VERSION].D.Byte[3]/10, CanRxMessage[CAN_ID_VERSION].D.Byte[3]%10, CanRxMessage[CAN_ID_VERSION].D.Byte[7], CanRxMessage[CAN_ID_VERSION].D.Byte[6], 'a'+ CanRxMessage[CAN_ID_VERSION].D.Byte[5]); |
||
155 | if(Partner.ErrorCode) |
||
156 | { |
||
157 | if(IamMaster == SLAVE) LCD_printfxy(0,2,"Master Err: %d",Partner.ErrorCode) |
||
158 | else LCD_printfxy(0,2,"Slave Err: %d",Partner.ErrorCode); |
||
159 | } |
||
160 | else |
||
161 | { |
||
162 | LCD_printfxy(0,2,"Set:%d", CanRxMessage[CAN_ID_VERSION].D.Byte[1]); |
||
163 | } |
||
164 | LCD_printfxy(0,3,"%s",PartnerErrorMSG); |
||
165 | if(Partner.StatusFlags3 & FC_STATUS3_BOAT) LCD_printfxy(16,2,"BOAT"); |
||
166 | } |
||
167 | else |
||
168 | LCD_printfxy(0,2,"not connected", CanTxMessage[CAN_ID_VERSION].D.Byte[1]); |
||
169 | break; |
||
170 | case 2: |
||
41 | ingob | 171 | if (GPSData.Status == INVALID) |
172 | { |
||
173 | LCD_printfxy(0,0,"No GPS data"); |
||
174 | LCD_printfxy(0,1,"Lon: "); |
||
175 | LCD_printfxy(0,2,"Lat: "); |
||
176 | LCD_printfxy(0,3,"Alt: "); |
||
177 | } |
||
178 | else // newdata or processed |
||
179 | { |
||
122 | killagreg | 180 | LCD_printfxy(0,0,"Sat:%02d ", GPSData.NumOfSats); |
41 | ingob | 181 | switch (GPSData.SatFix) |
182 | { |
||
183 | case SATFIX_NONE: |
||
127 | killagreg | 184 | LCD_printfxy(7,0,"NoFix"); |
41 | ingob | 185 | break; |
186 | case SATFIX_2D: |
||
127 | killagreg | 187 | LCD_printfxy(7,0,"2DFix"); |
41 | ingob | 188 | break; |
189 | case SATFIX_3D: |
||
127 | killagreg | 190 | LCD_printfxy(7,0,"3DFix"); |
41 | ingob | 191 | break; |
192 | default: |
||
127 | killagreg | 193 | LCD_printfxy(7,0,"??Fix"); |
41 | ingob | 194 | break; |
195 | } |
||
121 | killagreg | 196 | if(GPSData.Flags & FLAG_DIFFSOLN) |
197 | { |
||
127 | killagreg | 198 | LCD_printfxy(12,0,"/DGPS"); |
121 | killagreg | 199 | } |
200 | else |
||
201 | { |
||
127 | killagreg | 202 | LCD_printfxy(12,0," "); |
121 | killagreg | 203 | } |
204 | |||
51 | killagreg | 205 | if(GPSData.Position.Longitude < 0) sign = '-'; |
206 | else sign = '+'; |
||
53 | killagreg | 207 | i1 = abs(GPSData.Position.Longitude)/10000000L; |
208 | i2 = abs(GPSData.Position.Longitude)%10000000L; |
||
54 | killagreg | 209 | LCD_printfxy(0,1,"Lon:%c%03ld.%07ld deg",sign, i1, i2); |
51 | killagreg | 210 | if(GPSData.Position.Latitude < 0) sign = '-'; |
211 | else sign = '+'; |
||
53 | killagreg | 212 | i1 = abs(GPSData.Position.Latitude)/10000000L; |
213 | i2 = abs(GPSData.Position.Latitude)%10000000L; |
||
54 | killagreg | 214 | LCD_printfxy(0,2,"Lat:%c%03ld.%07ld deg",sign, i1, i2); |
51 | killagreg | 215 | if(GPSData.Position.Altitude < 0) sign = '-'; |
216 | else sign = '+'; |
||
53 | killagreg | 217 | i1 = abs(GPSData.Position.Altitude)/1000L; |
218 | i2 = abs(GPSData.Position.Altitude)%1000L; |
||
708 | holgerb | 219 | LCD_printfxy(0,3,"Alt:%c%04ld.%03ldm V%d", sign, i1, i2, GPS_Version/1000); |
41 | ingob | 220 | } |
221 | break; |
||
697 | holgerb | 222 | case 3: |
41 | ingob | 223 | if (GPSData.Status == INVALID) |
224 | { |
||
225 | LCD_printfxy(0,0,"No GPS data"); |
||
226 | LCD_printfxy(0,1,"Speed N: "); |
||
227 | LCD_printfxy(0,2,"Speed E: "); |
||
228 | LCD_printfxy(0,3,"Speed T: "); |
||
229 | } |
||
230 | else // newdata or processed |
||
231 | { |
||
124 | killagreg | 232 | LCD_printfxy(0,0,"Sat:%02d ", GPSData.NumOfSats); |
41 | ingob | 233 | switch (GPSData.SatFix) |
234 | { |
||
235 | case SATFIX_NONE: |
||
127 | killagreg | 236 | LCD_printfxy(7,0,"NoFix"); |
41 | ingob | 237 | break; |
238 | case SATFIX_2D: |
||
127 | killagreg | 239 | LCD_printfxy(7,0,"2DFix"); |
41 | ingob | 240 | break; |
241 | case SATFIX_3D: |
||
127 | killagreg | 242 | LCD_printfxy(7,0,"3DFix"); |
41 | ingob | 243 | break; |
244 | default: |
||
127 | killagreg | 245 | LCD_printfxy(7,0,"??Fix"); |
41 | ingob | 246 | break; |
247 | } |
||
124 | killagreg | 248 | if(GPSData.Flags & FLAG_DIFFSOLN) |
249 | { |
||
127 | killagreg | 250 | LCD_printfxy(12,0,"/DGPS"); |
124 | killagreg | 251 | } |
252 | else |
||
253 | { |
||
127 | killagreg | 254 | LCD_printfxy(12,0," "); |
124 | killagreg | 255 | } |
256 | |||
41 | ingob | 257 | LCD_printfxy(0,1,"Speed N: %+4ld cm/s",GPSData.Speed_North); |
258 | LCD_printfxy(0,2,"Speed E: %+4ld cm/s",GPSData.Speed_East); |
||
259 | LCD_printfxy(0,3,"Speed T: %+4ld cm/s",GPSData.Speed_Top); |
||
260 | } |
||
261 | break; |
||
697 | holgerb | 262 | case 4: |
41 | ingob | 263 | LCD_printfxy(0,0,"GPS UTC Time"); |
264 | if (!SystemTime.Valid) |
||
265 | { |
||
266 | LCD_printfxy(0,1," "); |
||
267 | LCD_printfxy(0,2," No time data! "); |
||
268 | LCD_printfxy(0,3," "); |
||
269 | } |
||
270 | else // newdata or processed |
||
271 | { |
||
272 | LCD_printfxy(0,1," "); |
||
273 | LCD_printfxy(0,2,"Date: %02i/%02i/%04i",SystemTime.Month, SystemTime.Day, SystemTime.Year); |
||
274 | LCD_printfxy(0,3,"Time: %02i:%02i:%02i.%03i", SystemTime.Hour, SystemTime.Min, SystemTime.Sec, SystemTime.mSec); |
||
275 | } |
||
276 | break; |
||
697 | holgerb | 277 | case 5: // Navi Params 1 from FC |
41 | ingob | 278 | LCD_printfxy(0,0,"NaviMode: %3i" , Parameter.NaviGpsModeControl); |
516 | holgerb | 279 | LCD_printfxy(0,1,"G :%3i P :%3i ",Parameter.NaviGpsGain, Parameter.NaviGpsP); |
280 | LCD_printfxy(0,2,"I :%3i D :%3i ",Parameter.NaviGpsI, Parameter.NaviGpsD); |
||
281 | LCD_printfxy(0,3,"ACC:%3i SAT:%3i ",Parameter.NaviGpsACC, Parameter.NaviGpsMinSat); |
||
41 | ingob | 282 | break; |
697 | holgerb | 283 | case 6: // Navi Params 2 from FC |
59 | killagreg | 284 | LCD_printfxy(0,0,"Stick TS: %3i", Parameter.NaviStickThreshold); |
532 | holgerb | 285 | LCD_printfxy(0,1,"WP_Radius: %3im",MaxWP_Radius_in_m); |
516 | holgerb | 286 | LCD_printfxy(0,2,"WindCorr: %3i", Parameter.NaviWindCorrection); |
287 | LCD_printfxy(0,3,"AccComp: %3i", Parameter.NaviSpeedCompensation); |
||
59 | killagreg | 288 | break; |
697 | holgerb | 289 | case 7: // Navi Params 3 from FC |
59 | killagreg | 290 | LCD_printfxy(0,0,"Angle-Limit: %3i", Parameter.NaviAngleLimitation); |
516 | holgerb | 291 | LCD_printfxy(0,1," P-Limit: %3i", Parameter.NaviGpsPLimit); |
292 | LCD_printfxy(0,2," I-Limit: %3i", Parameter.NaviGpsILimit); |
||
293 | LCD_printfxy(0,3," D-Limit: %3i", Parameter.NaviGpsDLimit); |
||
59 | killagreg | 294 | break; |
697 | holgerb | 295 | case 8: // Max Ranges |
351 | holgerb | 296 | LCD_printfxy(0,0,"Maximum flying "); |
532 | holgerb | 297 | LCD_printfxy(0,1,"Range: %4im ", AbsoluteFlyingRange_m); |
298 | LCD_printfxy(0,2,"Descend: %4im ", AutoDescendRange_m); |
||
516 | holgerb | 299 | LCD_printfxy(0,3,"Altitude:%4im ", AbsoluteFlyingAltitude); |
532 | holgerb | 300 | if(!AbsoluteFlyingRange_m) LCD_printfxy(9,1,"disabled"); |
301 | if(!AutoDescendRange_m) LCD_printfxy(9,2,"disabled"); |
||
355 | holgerb | 302 | if(!AbsoluteFlyingAltitude) LCD_printfxy(9,3,"disabled"); |
351 | holgerb | 303 | break; |
697 | holgerb | 304 | case 9: |
41 | ingob | 305 | LCD_printfxy(0,0,"Home Position"); |
215 | killagreg | 306 | if(NaviData.HomePosition.Status == INVALID) |
41 | ingob | 307 | { |
308 | LCD_printfxy(0,1," "); |
||
309 | LCD_printfxy(0,2," Is not set. "); |
||
310 | LCD_printfxy(0,3," "); |
||
311 | } |
||
312 | else |
||
313 | { |
||
215 | killagreg | 314 | if(NaviData.HomePosition.Longitude < 0) sign = '-'; |
51 | killagreg | 315 | else sign = '+'; |
215 | killagreg | 316 | i1 = abs(NaviData.HomePosition.Longitude)/10000000L; |
317 | i2 = abs(NaviData.HomePosition.Longitude)%10000000L; |
||
55 | killagreg | 318 | LCD_printfxy(0,1,"Lon:%c%03ld.%07ld deg",sign, i1, i2); |
215 | killagreg | 319 | if(NaviData.HomePosition.Latitude < 0) sign = '-'; |
51 | killagreg | 320 | else sign = '+'; |
215 | killagreg | 321 | i1 = abs(NaviData.HomePosition.Latitude)/10000000L; |
322 | i2 = abs(NaviData.HomePosition.Latitude)%10000000L; |
||
55 | killagreg | 323 | LCD_printfxy(0,2,"Lat:%c%03ld.%07ld deg",sign, i1, i2); |
215 | killagreg | 324 | if(NaviData.HomePosition.Altitude < 0) sign = '-'; |
51 | killagreg | 325 | else sign = '+'; |
215 | killagreg | 326 | i1 = abs(NaviData.HomePosition.Altitude)/1000L; |
327 | i2 = abs(NaviData.HomePosition.Altitude)%1000L; |
||
589 | holgerb | 328 | LCD_printfxy(0,3,"Alt:%c%04ld.%1dm",sign, i1, i2/1000); |
588 | holgerb | 329 | switch(Parameter.HomeYawMode) |
330 | { |
||
331 | case NO_CHANGE: LCD_printfxy(17,3,"(-)"); break; |
||
332 | case FRONT_TO_HOME: LCD_printfxy(17,3,"(F)"); break; |
||
333 | case REAR_TO_HOME: LCD_printfxy(17,3,"(R)"); break; |
||
334 | case LIKE_AT_START: LCD_printfxy(17,3,"(S)"); break; |
||
335 | } |
||
41 | ingob | 336 | } |
337 | break; |
||
697 | holgerb | 338 | case 10: |
318 | holgerb | 339 | LCD_printfxy(0,0,"Target Position"); |
340 | if(NaviData.TargetPosition.Status == INVALID) |
||
341 | { |
||
342 | LCD_printfxy(0,1," "); |
||
343 | LCD_printfxy(0,2," Is not set. "); |
||
344 | LCD_printfxy(0,3," "); |
||
345 | } |
||
346 | else |
||
347 | { |
||
348 | if(NaviData.TargetPosition.Longitude < 0) sign = '-'; |
||
349 | else sign = '+'; |
||
350 | i1 = abs(NaviData.TargetPosition.Longitude)/10000000L; |
||
351 | i2 = abs(NaviData.TargetPosition.Longitude)%10000000L; |
||
352 | LCD_printfxy(0,1,"Lon:%c%03ld.%07ld deg",sign, i1, i2); |
||
353 | if(NaviData.TargetPosition.Latitude < 0) sign = '-'; |
||
354 | else sign = '+'; |
||
355 | i1 = abs(NaviData.TargetPosition.Latitude)/10000000L; |
||
356 | i2 = abs(NaviData.TargetPosition.Latitude)%10000000L; |
||
357 | LCD_printfxy(0,2,"Lat:%c%03ld.%07ld deg",sign, i1, i2); |
||
358 | if(NaviData.HomePosition.Altitude < 0) sign = '-'; |
||
359 | else sign = '+'; |
||
360 | i1 = abs(NaviData.TargetPosition.Altitude)/1000L; |
||
361 | i2 = abs(NaviData.TargetPosition.Altitude)%1000L; |
||
588 | holgerb | 362 | LCD_printfxy(0,3,"Alt:%c%04ld.%03ldm",sign, i1, i2); |
318 | holgerb | 363 | } |
364 | break; |
||
697 | holgerb | 365 | case 11: // RC stick controls from FC |
41 | ingob | 366 | LCD_printfxy(0,0,"RC-Sticks" ); |
516 | holgerb | 367 | LCD_printfxy(0,1,"Ni:%4i Ro:%4i ",FC.StickNick, FC.StickRoll); |
368 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",FC.StickGas, FC.StickYaw); |
||
369 | LCD_printfxy(0,3,"RC-Level: %3i", FC.RC_Quality); // Remote Control Level from FC |
||
41 | ingob | 370 | break; |
697 | holgerb | 371 | case 12: // RC poti controls from FC |
190 | killagreg | 372 | LCD_printfxy(0,0,"RC-Potis 1" ); |
516 | holgerb | 373 | LCD_printfxy(0,1,"Po1:%3i Po2:%3i ",FC.Poti[0], FC.Poti[1]); |
374 | LCD_printfxy(0,2,"Po3:%3i Po4:%3i ",FC.Poti[2], FC.Poti[3]); |
||
41 | ingob | 375 | break; |
697 | holgerb | 376 | case 13: // RC poti controls from FC |
190 | killagreg | 377 | LCD_printfxy(0,0,"RC-Potis 2" ); |
516 | holgerb | 378 | LCD_printfxy(0,1,"Po5:%3i Po6:%3i ",FC.Poti[4], FC.Poti[5]); |
379 | LCD_printfxy(0,2,"Po7:%3i Po8:%3i ",FC.Poti[6], FC.Poti[7]); |
||
190 | killagreg | 380 | break; |
697 | holgerb | 381 | case 14: // attitude from FC |
66 | killagreg | 382 | if(FromFlightCtrl.AngleNick < 0) sign = '-'; |
383 | else sign = '+'; |
||
384 | i1 = abs(FromFlightCtrl.AngleNick)/10; |
||
385 | i2 = abs(FromFlightCtrl.AngleNick)%10; |
||
201 | killagreg | 386 | LCD_printfxy(0,0,"GyroNick:%c%03ld.%01ld", sign, i1, i2); |
66 | killagreg | 387 | if(FromFlightCtrl.AngleRoll < 0) sign = '-'; |
388 | else sign = '+'; |
||
389 | i1 = abs(FromFlightCtrl.AngleRoll)/10; |
||
390 | i2 = abs(FromFlightCtrl.AngleRoll)%10; |
||
516 | holgerb | 391 | LCD_printfxy(0,1,"GyroRoll:%c%03ld.%01ld", sign, i1, i2); |
688 | holgerb | 392 | if(FromFlightCtrl_AccNick < 0) sign = '-'; |
67 | killagreg | 393 | else sign = '+'; |
688 | holgerb | 394 | i1 = abs(FromFlightCtrl_AccNick)/10; |
395 | i2 = abs(FromFlightCtrl_AccNick)%10; |
||
201 | killagreg | 396 | LCD_printfxy(0,2," AccNick:%c%03ld.%01ld", sign, i1, i2); |
688 | holgerb | 397 | if(FromFlightCtrl_AccRoll < 0) sign = '-'; |
67 | killagreg | 398 | else sign = '+'; |
688 | holgerb | 399 | i1 = abs(FromFlightCtrl_AccRoll)/10; |
400 | i2 = abs(FromFlightCtrl_AccRoll)%10; |
||
516 | holgerb | 401 | LCD_printfxy(0,3," AccRoll:%c%03ld.%01ld", sign, i1, i2); |
41 | ingob | 402 | break; |
697 | holgerb | 403 | case 15: |
688 | holgerb | 404 | LCD_printfxy(0,0,"Analog inputs"); |
405 | LCD_printfxy(0,1,"A5:%3i ",AnalogData.Ch5); |
||
406 | LCD_printfxy(0,2,"A6:%3i ",AnalogData.Ch6); |
||
407 | LCD_printfxy(0,3,"A7:%3i ",AnalogData.Ch7); |
||
41 | ingob | 408 | break; |
697 | holgerb | 409 | case 16: |
475 | holgerb | 410 | LCD_printfxy(0,0,"Compass: %3i", FromFlightCtrl.GyroHeading / 10); |
411 | LCD_printfxy(0,1,"Man.-Offset:%3i", FC.FromFC_CompassOffset / 10); |
||
412 | if(FC.FromFC_DisableDeclination) |
||
516 | holgerb | 413 | { |
489 | killagreg | 414 | LCD_printfxy(0,2,"Mag.Declinat.:disabl"); |
475 | holgerb | 415 | } |
416 | else |
||
417 | { |
||
489 | killagreg | 418 | if(GeoMagDec < 0) sign = '-'; |
419 | else sign = '+'; |
||
420 | LCD_printfxy(0,2,"Mag.Declinat.:%c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
||
475 | holgerb | 421 | } |
463 | holgerb | 422 | LCD_printfxy(0,3,"True Compass: %3i", GyroCompassCorrected/10); |
516 | holgerb | 423 | break; |
697 | holgerb | 424 | case 17: // User Parameter |
153 | killagreg | 425 | LCD_printfxy(0,0,"UP1:%3i UP2:%3i",Parameter.User1,Parameter.User2); |
426 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i",Parameter.User3,Parameter.User4); |
||
427 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i",Parameter.User5,Parameter.User6); |
||
428 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i",Parameter.User7,Parameter.User8); |
||
41 | ingob | 429 | break; |
697 | holgerb | 430 | case 18: // User Parameter |
426 | holgerb | 431 | LCD_printfxy(0,0,"SD-Card Logs"); |
548 | holgerb | 432 | if(SDCardInfo.Valid == 1) |
433 | { |
||
708 | holgerb | 434 | LCD_printfxy(0,1,"GPX: %4i (%3ims) ",Logged_GPX_Counter,LogCfg.GPX_Interval); |
435 | LCD_printfxy(0,2,"KML: %4i (%3ims) ",Logged_KML_Counter,LogCfg.KML_Interval); |
||
436 | LCD_printfxy(0,3,"Trig:%4i ",Logged_TRIG_Counter); |
||
548 | holgerb | 437 | } |
438 | else |
||
439 | LCD_printfxy(0,1,"no card in slot "); |
||
380 | holgerb | 440 | break; |
697 | holgerb | 441 | case 19: // magnetic field |
292 | killagreg | 442 | if(Compass_CalState) |
254 | killagreg | 443 | { |
292 | killagreg | 444 | LCD_printfxy(0,0,"Calibration:"); |
445 | LCD_printfxy(0,1,"Step %d/", Compass_CalState); |
||
516 | holgerb | 446 | LCD_printfxy(0,2,"X %4i Y %4i Z %4i",MagVector.X,MagVector.Y,MagVector.Z); |
292 | killagreg | 447 | LCD_printfxy(9,3,"(ESC)(NEXT)"); |
448 | switch(Compass_CalState) |
||
254 | killagreg | 449 | { |
292 | killagreg | 450 | case 1: |
451 | case 3: |
||
452 | LCD_printfxy(7,1,"pause"); |
||
453 | break; |
||
454 | |||
455 | case 2: |
||
456 | LCD_printfxy(7,1,"horizontal"); |
||
457 | break; |
||
458 | |||
459 | case 4: |
||
460 | LCD_printfxy(7,1,"vertical"); |
||
461 | break; |
||
462 | |||
463 | case 5: |
||
464 | LCD_printfxy(7,1,"data saved"); |
||
465 | LCD_printfxy(8,3," (END) "); |
||
466 | break; |
||
489 | killagreg | 467 | |
292 | killagreg | 468 | default: |
469 | break; |
||
254 | killagreg | 470 | } |
471 | } |
||
292 | killagreg | 472 | else |
254 | killagreg | 473 | { |
330 | holgerb | 474 | if(GeoMagDec < 0) sign = '-'; |
475 | else sign = '+'; |
||
254 | killagreg | 476 | LCD_printfxy(0,0,"Magnetic Field"); |
516 | holgerb | 477 | LCD_printfxy(0,1,"X:%5i",MagVector.X); |
292 | killagreg | 478 | LCD_printfxy(0,2,"Y:%5i",MagVector.Y); |
479 | LCD_printfxy(0,3,"Z:%5i",MagVector.Z); |
||
330 | holgerb | 480 | LCD_printfxy(8,1,"Field:%3i",EarthMagneticField/5); |
489 | killagreg | 481 | if(Compass_I2CPort == NCMAG_PORT_EXTERN) LCD_printfxy(11,2,"Extern") |
482 | else LCD_printfxy(11,2,"Intern"); |
||
338 | holgerb | 483 | // LCD_printfxy(8,2,"Dec:%c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
484 | // LCD_printfxy(8,3,"Inc:%2i", EarthMagneticInclination); |
||
292 | killagreg | 485 | LCD_printfxy(15,3,"(CAL)"); |
486 | } |
||
487 | if(Keys & KEY4) // next step |
||
488 | { |
||
489 | if(Compass_CalState <5) Compass_SetCalState(Compass_CalState+1); |
||
490 | else Compass_SetCalState(0); |
||
491 | } |
||
492 | if(Keys & KEY3)Compass_SetCalState(0); // cancel |
||
41 | ingob | 493 | break; |
697 | holgerb | 494 | case 20: |
345 | holgerb | 495 | if(GeoMagDec < 0) sign = '-'; |
496 | else sign = '+'; |
||
338 | holgerb | 497 | LCD_printfxy(0,0,"Magnetic Field"); |
498 | LCD_printfxy(0,1,"Field:%3i (Percent)",EarthMagneticField/5); |
||
499 | LCD_printfxy(0,2,"Declination:%c%i.%1i ", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
||
500 | LCD_printfxy(0,3,"Inclination:%2i (%2i)", EarthMagneticInclination, EarthMagneticInclinationTheoretic); |
||
501 | break; |
||
697 | holgerb | 502 | case 21: |
426 | holgerb | 503 | LCD_printfxy(0,0,"SD-Setting "); |
504 | LCD_printfxy(0,2,"WP-Dynamic:%4i ",WaypointAcceleration); |
||
505 | break; |
||
697 | holgerb | 506 | case 22: |
453 | holgerb | 507 | LCD_printfxy(0,0,"CPU Processing "); |
659 | holgerb | 508 | LCD_printfxy(0,2,"GPS-Data: %2i.%iHz ",FreqNewGpsData/10, FreqNewGpsData%10); |
663 | holgerb | 509 | LCD_printfxy(0,3,"GPS-Update:%2i.%iHz ",FreqGpsNavProcessed/10, FreqGpsNavProcessed%10); |
659 | holgerb | 510 | if(FreqNewGpsData >= 48 && FreqNewGpsData <= 52) LCD_printfxy(18,2,"OK") else LCD_printfxy(18,2,"!!"); |
663 | holgerb | 511 | if(FreqGpsNavProcessed >= 350) LCD_printfxy(18,3,"OK") else LCD_printfxy(18,3,"!!"); |
453 | holgerb | 512 | break; |
697 | holgerb | 513 | case 23: |
489 | killagreg | 514 | LCD_printfxy(0,0,"BL Current" ); |
515 | LCD_printfxy(11,3,"(in 0.1A)" ); |
||
516 | for(i1 = 0; i1 < 3; i1++) |
||
517 | { |
||
502 | killagreg | 518 | LCD_printfxy(0,i1+1,"%3d %3d %3d %3d ",BL3_Current(i1*4),BL3_Current(i1*4+1),BL3_Current(i1*4+2),BL3_Current(i1*4+3)); |
519 | if(Motor[4 + i1 * 4].State == 0) break; |
||
489 | killagreg | 520 | } |
471 | holgerb | 521 | break; |
489 | killagreg | 522 | |
697 | holgerb | 523 | case 24: |
489 | killagreg | 524 | LCD_printfxy(0,0,"Ext. Compass" ); |
686 | holgerb | 525 | if(NCMAG_Compass_use_Orientation) |
489 | killagreg | 526 | { |
516 | holgerb | 527 | u8 tmp; |
528 | LCD_printfxy(0,1,"ACC X Y Z"); |
||
529 | LCD_printfxy(0,2," %5d %5d %5d", AccVector.X/40, AccVector.Y/40, AccVector.Z/40); |
||
530 | tmp = NCMAG_GetOrientationFromAcc(); |
||
531 | LCD_printfxy(0,3,"Orientat.: "); |
||
532 | if(!tmp) LCD_printfxy(11,3,"??") else LCD_printfxy(11,3,"%2d",tmp); |
||
533 | LCD_printfxy(15,3,"(%d)",NCMAG_Orientation); |
||
489 | killagreg | 534 | } |
535 | else |
||
536 | { |
||
537 | LCD_printfxy(0,1,"Not connected"); |
||
538 | } |
||
473 | holgerb | 539 | break; |
697 | holgerb | 540 | case 25: |
498 | killagreg | 541 | { |
504 | holgerb | 542 | static u8 index = 1; |
498 | killagreg | 543 | if(Keys & KEY3) // next step |
544 | { |
||
503 | holgerb | 545 | if(index < ToFC_MaxWpListIndex) index++; |
498 | killagreg | 546 | else index = 1; |
547 | } |
||
503 | holgerb | 548 | if(Keys & KEY4) FromFC_LoadWP_List = index; |
549 | LCD_printfxy(0,0,"Load WPL (fix)" ); |
||
498 | killagreg | 550 | LCD_printfxy(0,1,"Name: %s", WPL_Store.Name); |
551 | // 12345678901234567890 |
||
552 | LCD_printfxy(0,2,"Points Index "); |
||
553 | LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index); |
||
516 | holgerb | 554 | } |
498 | killagreg | 555 | break; |
697 | holgerb | 556 | case 26: |
504 | holgerb | 557 | { |
558 | static u8 index = 1; |
||
516 | holgerb | 559 | if(Keys & KEY3) |
504 | holgerb | 560 | { |
561 | if(index < ToFC_MaxWpListIndex) index++; |
||
562 | else index = 1; |
||
563 | } |
||
514 | holgerb | 564 | LCD_printfxy(0,0,"Load WPL (Rel)" ); |
504 | holgerb | 565 | LCD_printfxy(0,1,"Name: %s", WPL_Store.Name); |
566 | // 12345678901234567890 |
||
567 | LCD_printfxy(0,2,"Points Index "); |
||
516 | holgerb | 568 | if(GPSData.SatFix == SATFIX_3D) |
569 | { |
||
570 | LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index); |
||
571 | if(Keys & KEY4) FromFC_LoadWP_List = index | 0x80; |
||
572 | } |
||
573 | else LCD_printfxy(0,3," No Satfix ! ", index); |
||
514 | holgerb | 574 | |
516 | holgerb | 575 | } |
504 | holgerb | 576 | break; |
697 | holgerb | 577 | case 27: |
514 | holgerb | 578 | { |
579 | static u8 index = 1; |
||
516 | holgerb | 580 | if(Keys & KEY3) |
514 | holgerb | 581 | { |
582 | if(index < ToFC_MaxWpListIndex) index++; |
||
583 | else index = 1; |
||
584 | } |
||
585 | if(Keys & KEY4) FromFC_Load_SinglePoint = index; |
||
586 | LCD_printfxy(0,0,"Load Point" ); |
||
587 | LCD_printfxy(0,1,"Name: %s", WPL_Store.Name); |
||
588 | // 12345678901234567890 |
||
589 | // LCD_printfxy(0,2,"Points Index "); |
||
590 | LCD_printfxy(0,3,"Number: %3d (LOAD)", index); |
||
516 | holgerb | 591 | } |
514 | holgerb | 592 | break; |
697 | holgerb | 593 | case 28: |
514 | holgerb | 594 | { |
595 | static u8 index = 1; |
||
596 | if(Keys & KEY3) |
||
597 | { |
||
598 | if(index < ToFC_MaxWpListIndex) index++; |
||
599 | else index = 1; |
||
600 | } |
||
601 | LCD_printfxy(0,0,"Save Point" ); |
||
740 | holgerb | 602 | LCD_printfxy(0,1,"Alt: %3dm", NaviData.Altimeter_5cm/20); |
514 | holgerb | 603 | // 12345678901234567890 |
604 | LCD_printfxy(0,2,"Dir: %3d ", CompassSetpointCorrected/10); |
||
516 | holgerb | 605 | if(GPSData.SatFix == SATFIX_3D) |
514 | holgerb | 606 | { |
607 | LCD_printfxy(0,3,"Number: %3d (SAVE)", index); |
||
608 | if(Keys & KEY4) FromFC_Save_SinglePoint = index; |
||
609 | } |
||
610 | else LCD_printfxy(0,3," No Satfix ! ", index); |
||
516 | holgerb | 611 | } |
514 | holgerb | 612 | break; |
677 | holgerb | 613 | /* case 28: |
614 | LCD_printfxy(0,0,"Analog inputs"); |
||
615 | LCD_printfxy(0,0,"A0:%3i A1:%3i",AnalogData.Ch0,AnalogData.Ch1); |
||
616 | LCD_printfxy(0,1,"A2:%3i A3:%3i",AnalogData.Ch2,AnalogData.Ch3); |
||
617 | LCD_printfxy(0,2,"A4:%3i A5:%3i",AnalogData.Ch4,AnalogData.Ch5); |
||
618 | LCD_printfxy(0,3,"A6:%3i A7:%3i",AnalogData.Ch6,AnalogData.Ch7); |
||
619 | break; |
||
620 | */ |
||
688 | holgerb | 621 | |
697 | holgerb | 622 | case 29: |
708 | holgerb | 623 | LCD_printfxy(0,0,"Trigger Input"); |
624 | if(UART_VersionInfo.HWMajor >= 30) |
||
625 | { |
||
626 | if(BlitzSchuhConnected) LCD_printfxy(0,1,"External") |
||
627 | else LCD_printfxy(0,1,"Internal"); |
||
628 | LCD_printfxy(0,2,"Counter:%4d ",TrigLogging.Count); |
||
629 | LCD_printfxy(0,3,"Logfile:%4i ",Logged_TRIG_Counter); |
||
630 | } |
||
631 | else |
||
632 | { |
||
633 | LCD_printfxy(0,1,"Not Supported in "); |
||
634 | LCD_printfxy(0,2,"Hardware V%d ", UART_VersionInfo.HWMajor/10); |
||
635 | LCD_printfxy(0,3,"(V3 required)"); |
||
636 | } |
||
724 | holgerb | 637 | break; |
638 | case 30: |
||
639 | LCD_printfxy(0,0,"CamCtrl"); |
||
640 | if(!(FromCamCtrl.CamStatus & CAM_STATE_I2C_OK)) |
||
641 | { |
||
642 | LCD_printfxy(0,2,"Not connected"); |
||
729 | holgerb | 643 | if(CamCtrlTimeout < 10) LCD_printfxy(14,3,"(conn)"); // connect manually |
724 | holgerb | 644 | if(Keys & KEY4) CamCtrlTimeout = 65000; |
645 | } |
||
646 | else |
||
647 | { |
||
729 | holgerb | 648 | LCD_printfxy(8,0,"V%i.%02i",1 + FromCamCtrl.Version / 100, FromCamCtrl.Version % 100); |
649 | |||
724 | holgerb | 650 | switch(FromCamCtrl.Type) |
651 | { |
||
729 | holgerb | 652 | case TYPE_LANC: LCD_printfxy(13,0,"L"); break; |
653 | case TYPE_IR: LCD_printfxy(13,0,"I"); break; |
||
654 | case TYPE_MULTI: LCD_printfxy(13,0,"M"); break; |
||
724 | holgerb | 655 | } |
656 | LCD_printfxy(0,0,"CamCtrl"); |
||
729 | holgerb | 657 | LCD_printfxy(0,1,"Stat:"); |
658 | if(FromCamCtrl.CamStatus & CAM_STATE_RDY) LCD_printfxy(5,1,"RDY") |
||
659 | if(FromCamCtrl.CamStatus & CAM_STATE_REC_ACTIVE) LCD_printfxy(10,1,"REC"); |
||
660 | if(FromCamCtrl.CamStatus & CAM_STATE_PHOTO_MODE) LCD_printfxy(14,1,"PHOTO"); |
||
661 | if(FromCamCtrl.CamStatus & CAM_STATE_ZOOM) LCD_printfxy(5,1,"ZOOM "); |
||
662 | if(!(FromCamCtrl.CamStatus & CAM_STATE_RDY)) LCD_printfxy(5,1," ---"); |
||
708 | holgerb | 663 | |
729 | holgerb | 664 | LCD_printfxy(17,1,"(%c)",CamCtrlCharacter); |
665 | |||
724 | holgerb | 666 | if(FromCamCtrl.CamStatus & CAM_STATE_CAM_DISCONN) LCD_printfxy(0,2,"Disconn.") |
667 | else |
||
668 | { |
||
729 | holgerb | 669 | if(FromCamCtrl.CamStatus & CAM_STATE_OFF) LCD_printfxy(1,2,"Cam:OFF") else LCD_printfxy(1,2,"Cam:ON"); |
724 | holgerb | 670 | } |
729 | holgerb | 671 | LCD_printfxy(11,2,"Pics:%3d ",FromCamCtrl.PhotoCount); |
672 | //LCD_printfxy(5,2,"x%2x ",FromCamCtrl.CamStatus); |
||
724 | holgerb | 673 | if(FromCamCtrl.PPM1Okay) LCD_printfxy(0,3,"Zoom:%3i",FromCamCtrl.PPM1Data); |
674 | if(!FromCamCtrl.PPM2Okay) // there is PPM Input connected to the CamCtrl |
||
675 | { |
||
676 | LCD_printfxy(14,3,"(TRIG)"); |
||
677 | if(EE_Parameter.CamCtrlModeChannel == 0) |
||
678 | { |
||
729 | holgerb | 679 | if(FromCamCtrl.CamStatus & CAM_STATE_REC_ACTIVE) LCD_printfxy(9,3,"(off)") |
680 | else LCD_printfxy(9,3,"(REC)"); // Control only possible if no switch is assigned |
||
724 | holgerb | 681 | } |
729 | holgerb | 682 | else LCD_printfxy(2,3,"CH:%3i",127+PPM_In[EE_Parameter.CamCtrlModeChannel]); |
724 | holgerb | 683 | |
684 | if(Keys & KEY3) |
||
685 | { |
||
686 | ToCamCtrl.CamCommand &= ~(CAM_CMD_REC_OFF|CAM_CMD_REC_ON); |
||
687 | if(FromCamCtrl.CamStatus & CAM_STATE_REC_ACTIVE) ToCamCtrl.CamCommand |= CAM_CMD_REC_OFF; |
||
688 | else ToCamCtrl.CamCommand |= CAM_CMD_REC_ON; |
||
689 | } |
||
690 | if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SHUTTER; |
||
691 | //if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_RESET_CAM; |
||
692 | //if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SWITCH_ON; |
||
693 | //if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SWITCH_OFF; |
||
694 | } |
||
695 | else |
||
696 | { |
||
697 | if(FromCamCtrl.PPM2Okay) LCD_printfxy(10,3,"PPM:%3i",FromCamCtrl.PPM2Data); |
||
698 | } |
||
699 | } |
||
688 | holgerb | 700 | break; |
724 | holgerb | 701 | |
41 | ingob | 702 | default: |
201 | killagreg | 703 | //MaxMenuItem = MenuItem - 1; |
41 | ingob | 704 | MenuItem = 0; |
705 | break; |
||
516 | holgerb | 706 | } |
1 | ingob | 707 | } |