Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1917 | holgerb | 1 | #include "libfc.h" |
2 | #include "printf_P.h" |
||
3 | #include "main.h" |
||
4 | #include "spi.h" |
||
5 | #include "capacity.h" |
||
6 | |||
1925 | holgerb | 7 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
8 | |||
1920 | holgerb | 9 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
10 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
||
11 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
||
12 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
||
1921 | holgerb | 13 | #define HoTT_printf_BLINK(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
14 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
||
1917 | holgerb | 15 | |
1919 | holgerb | 16 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
17 | #define VOICE_BEEP 5 |
||
1920 | holgerb | 18 | #define HoTT_GRAD 96 |
19 | #define HoTT_LINKS 123 |
||
20 | #define HoTT_RECHTS 124 |
||
21 | #define HoTT_OBEN 125 |
||
22 | #define HoTT_UNTEN 126 |
||
1917 | holgerb | 23 | |
1930 | holgerb | 24 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
25 | { |
||
26 | //0123456789123456 |
||
27 | "No Error \0", // 0 |
||
28 | "Not compatible \0", // 1 |
||
29 | "MK3Mag not compa\0", // 2 |
||
30 | "No FC communicat\0", // 3 |
||
31 | "MK3Mag communica\0", // 4 |
||
32 | "GPS communicatio\0", // 5 |
||
33 | "compass value \0", // 6 |
||
34 | "RC Signal lost \0", // 7 |
||
35 | "FC spi rx error \0", // 8 |
||
36 | "No NC communicat\0", // 9 |
||
37 | "FC Nick Gyro \0", // 10 |
||
38 | "FC Roll Gyro \0", // 11 |
||
39 | "FC Yaw Gyro \0", // 12 |
||
40 | "FC Nick ACC \0", // 13 |
||
41 | "FC Roll ACC \0", // 14 |
||
42 | "FC Z-ACC \0", // 15 |
||
43 | "Pressure sensor \0", // 16 |
||
1936 | holgerb | 44 | "I2C FC->BL-Ctrl \0", // 17 |
1930 | holgerb | 45 | "Bl Missing \0", // 18 |
46 | "Mixer Error \0", // 19 |
||
1937 | holgerb | 47 | "Carefree Error \0", // 20 |
48 | "GPS Fix lost \0" // 21 |
||
1930 | holgerb | 49 | }; |
1919 | holgerb | 50 | |
51 | //--------------------------------------------------------------- |
||
1917 | holgerb | 52 | void Hott_ClearLine(unsigned char line) |
53 | { |
||
54 | HoTT_printfxy(0,line," "); |
||
55 | } |
||
1919 | holgerb | 56 | //--------------------------------------------------------------- |
1917 | holgerb | 57 | |
1919 | holgerb | 58 | unsigned char HoTT_Waring(void) |
59 | { |
||
60 | if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG); |
||
1933 | holgerb | 61 | if(MotorenEin && NC_ErrorCode) return(VOICE_BEEP); |
1919 | holgerb | 62 | return(0); |
63 | } |
||
64 | |||
65 | //--------------------------------------------------------------- |
||
1940 | holgerb | 66 | unsigned char NC_Fills_HoTT_Telemety() |
67 | { |
||
68 | unsigned char *ptr; |
||
69 | unsigned char max = 0,i,z; |
||
70 | switch(FromNaviCtrl.Param.Byte[11]) |
||
71 | { |
||
72 | case HOTT_VARIO_PACKET_ID: |
||
73 | ptr = (unsigned char *) &VarioPacket; |
||
74 | max = sizeof(VarioPacket); |
||
75 | break; |
||
76 | case HOTT_GPS_PACKET_ID: |
||
77 | ptr = (unsigned char *) &GPSPacket; |
||
78 | max = sizeof(GPSPacket); |
||
79 | break; |
||
80 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
||
81 | ptr = (unsigned char *) &ElectricAirPacket; |
||
82 | max = sizeof(ElectricAirPacket); |
||
83 | break; |
||
84 | } |
||
85 | z = FromNaviCtrl.Param.Byte[0]; // Data allocation |
||
86 | |||
87 | for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++) |
||
88 | { |
||
89 | if(z >= max) break; |
||
90 | ptr[z] = FromNaviCtrl.Param.Byte[2+i]; |
||
91 | z++; |
||
92 | } |
||
93 | } |
||
94 | |||
95 | //--------------------------------------------------------------- |
||
96 | |||
1919 | holgerb | 97 | unsigned char HoTT_Telemety(unsigned char packet_request) |
98 | { |
||
99 | switch(packet_request) |
||
100 | { |
||
101 | case HOTT_VARIO_PACKET_ID: |
||
1921 | holgerb | 102 | VarioPacket.Altitude = HoehenWert/100 + 500; |
1940 | holgerb | 103 | VarioPacket.m_sec = GPSInfo.Speed+120; |
104 | GPSPacket.m_3sec = 120; |
||
105 | GPSPacket.m_10sec = 120; |
||
1919 | holgerb | 106 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
107 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
||
108 | VarioPacket.WarnBeep = HoTT_Waring(); |
||
109 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
||
110 | return(sizeof(VarioPacket)); |
||
111 | break; |
||
1921 | holgerb | 112 | |
1919 | holgerb | 113 | case HOTT_GPS_PACKET_ID: |
1921 | holgerb | 114 | GPSPacket.Altitude = HoehenWert/100 + 500; |
1940 | holgerb | 115 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; |
116 | // GPSPacket.Heading = GPSInfo.HomeBearing/2;//KompassValue/2; |
||
117 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; |
||
1921 | holgerb | 118 | GPSPacket.m_sec = GPSInfo.Speed+120; |
119 | GPSPacket.m_3sec = 120; |
||
120 | GPSPacket.m_10sec = 0; |
||
1919 | holgerb | 121 | GPSPacket.WarnBeep = HoTT_Waring(); |
122 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
||
123 | return(sizeof(GPSPacket)); |
||
124 | break; |
||
125 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
||
1940 | holgerb | 126 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
1921 | holgerb | 127 | ElectricAirPacket.Battery1 = UBat; |
1940 | holgerb | 128 | ElectricAirPacket.Battery2 = UBat; |
129 | ElectricAirPacket.m_sec = GPSInfo.Speed+120; |
||
130 | ElectricAirPacket.m_3sec = 120; |
||
131 | ElectricAirPacket.InputVoltage = UBat; |
||
132 | ElectricAirPacket.Temperature1 = Motor[0].Temperature + 20; |
||
133 | ElectricAirPacket.Temperature2 = Motor[1].Temperature + 20; |
||
134 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
||
1919 | holgerb | 135 | ElectricAirPacket.WarnBeep = HoTT_Waring(); |
1940 | holgerb | 136 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
1919 | holgerb | 137 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
138 | return(sizeof(ElectricAirPacket)); |
||
139 | break; |
||
140 | default: return(0); |
||
141 | } |
||
142 | } |
||
143 | |||
144 | //--------------------------------------------------------------- |
||
1917 | holgerb | 145 | void HoTT_Menu(void) |
146 | { |
||
1933 | holgerb | 147 | static unsigned char line, page = 0; |
1921 | holgerb | 148 | unsigned char tmp; |
149 | if(page == 0) |
||
1933 | holgerb | 150 | switch(line++) |
1917 | holgerb | 151 | { |
1919 | holgerb | 152 | case 0: |
1923 | holgerb | 153 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
1939 | holgerb | 154 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
155 | else |
||
156 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
||
157 | |||
158 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
||
159 | { |
||
160 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
||
161 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
||
162 | } |
||
163 | else HoTT_printfxy(10,0,"ALT:---- "); |
||
164 | break; |
||
165 | case 1: |
||
166 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
167 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
||
168 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
||
1941 | holgerb | 169 | HoTT_printfxy(10,1,"DIR: %3d%c",ErsatzKompassInGrad, HoTT_GRAD); |
1939 | holgerb | 170 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy(20,1,"C") else HoTT_printfxy(20,1," "); |
171 | break; |
||
172 | case 2: |
||
173 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
174 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
||
175 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
||
1940 | holgerb | 176 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
1939 | holgerb | 177 | break; |
178 | case 3: |
||
179 | HoTT_printfxy(9,0,"I"); |
||
180 | HoTT_printfxy(9,1,"I"); |
||
181 | HoTT_printfxy(9,2,"I"); |
||
182 | HoTT_printfxy(0,3,"---------+-----------"); |
||
183 | HoTT_printfxy(0,6,"---------------------"); |
||
184 | break; |
||
185 | case 4: |
||
186 | if(NaviDataOkay) |
||
187 | { |
||
1940 | holgerb | 188 | HoTT_printfxy(9,4,"I"); |
1939 | holgerb | 189 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
190 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
||
191 | switch (GPSInfo.SatFix) |
||
192 | { |
||
193 | case SATFIX_3D: |
||
194 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
||
195 | else HoTT_printfxy(7,4,"3D"); |
||
196 | break; |
||
197 | default: |
||
198 | HoTT_printfxy(7,4,"! "); |
||
199 | break; |
||
200 | } |
||
201 | } |
||
202 | else |
||
203 | { //012345678901234567890 |
||
1940 | holgerb | 204 | Hott_ClearLine(4); |
1939 | holgerb | 205 | } |
206 | break; |
||
207 | case 5: |
||
208 | if(NaviDataOkay) |
||
209 | { |
||
1940 | holgerb | 210 | HoTT_printfxy(9,5,"I"); |
1939 | holgerb | 211 | HoTT_printfxy(4,5,"%2um/s",GPSInfo.Speed,GPSInfo.NumOfSats); |
212 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
||
213 | } |
||
1940 | holgerb | 214 | else Hott_ClearLine(5); |
1939 | holgerb | 215 | break; |
216 | case 6: |
||
217 | /* |
||
218 | if(RequiredMotors == 4) Hott_ClearLine(6); |
||
219 | else |
||
220 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
||
221 | else |
||
222 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,HoTT_GRAD); |
||
223 | //HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard); |
||
224 | */ |
||
225 | break; |
||
226 | case 7: if(NC_ErrorCode) |
||
227 | { |
||
228 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
||
229 | { |
||
230 | Hott_ClearLine(7); |
||
231 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
||
232 | } |
||
233 | else |
||
234 | { |
||
235 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
||
236 | } |
||
237 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
||
238 | break; |
||
239 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
||
240 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
||
241 | case 9: |
||
242 | case 10: |
||
243 | case 11: |
||
244 | case 12: |
||
245 | case 13: |
||
246 | case 14: |
||
247 | case 15: |
||
248 | case 16: |
||
249 | if(HottKeyboard == 8) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
||
250 | HottKeyboard = 0; |
||
251 | break; |
||
252 | default: line = 0; |
||
253 | break; |
||
254 | } |
||
255 | else |
||
256 | if(page == 1) |
||
257 | switch(line++) |
||
258 | { |
||
259 | case 0: |
||
260 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
1923 | holgerb | 261 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
262 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
||
1917 | holgerb | 263 | break; |
264 | case 1: |
||
1921 | holgerb | 265 | HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD); |
1917 | holgerb | 266 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
1920 | holgerb | 267 | { |
268 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
||
269 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
||
270 | } |
||
271 | else HoTT_printfxy(10,1,"ALT:---- "); |
||
272 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
||
1917 | holgerb | 273 | break; |
274 | case 2: |
||
275 | if(NaviDataOkay) |
||
276 | { |
||
1923 | holgerb | 277 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
1917 | holgerb | 278 | } |
279 | else |
||
280 | { |
||
1923 | holgerb | 281 | Hott_ClearLine(2); |
1917 | holgerb | 282 | } |
283 | break; |
||
1923 | holgerb | 284 | case 3: |
285 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
||
286 | break; |
||
1917 | holgerb | 287 | case 4: |
288 | if(NaviDataOkay) |
||
289 | { |
||
1919 | holgerb | 290 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
1917 | holgerb | 291 | switch (GPSInfo.SatFix) |
292 | { |
||
293 | case SATFIX_3D: |
||
294 | HoTT_printfxy(16,4," 3D "); |
||
295 | break; |
||
1925 | holgerb | 296 | //case SATFIX_2D: |
297 | //case SATFIX_NONE: |
||
1917 | holgerb | 298 | default: |
1925 | holgerb | 299 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
1917 | holgerb | 300 | break; |
301 | } |
||
302 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
||
303 | { |
||
304 | HoTT_printfxy(16,4,"DGPS "); |
||
305 | } |
||
306 | } |
||
307 | else |
||
308 | { //012345678901234567890 |
||
1930 | holgerb | 309 | HoTT_printfxy(0,4," No NaviCtrl "); |
1917 | holgerb | 310 | } |
311 | break; |
||
312 | case 5: |
||
1923 | holgerb | 313 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
314 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(18,5,"CF") else HoTT_printfxy(18,5," "); |
||
1917 | holgerb | 315 | break; |
316 | case 6: |
||
317 | if(RequiredMotors == 4) Hott_ClearLine(6); |
||
318 | else |
||
1923 | holgerb | 319 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
1917 | holgerb | 320 | else |
1923 | holgerb | 321 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,HoTT_GRAD); |
1920 | holgerb | 322 | //HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard); |
1917 | holgerb | 323 | break; |
1930 | holgerb | 324 | case 7: if(NC_ErrorCode) |
325 | { |
||
326 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
||
327 | { |
||
328 | Hott_ClearLine(7); |
||
329 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
||
330 | } |
||
331 | else |
||
332 | { |
||
333 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
||
334 | } |
||
1937 | holgerb | 335 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
1917 | holgerb | 336 | break; |
1919 | holgerb | 337 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
338 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
||
1921 | holgerb | 339 | case 9: |
1917 | holgerb | 340 | case 10: |
341 | case 11: |
||
342 | case 12: |
||
343 | case 13: |
||
1919 | holgerb | 344 | case 14: |
345 | case 15: |
||
346 | case 16: |
||
1939 | holgerb | 347 | if(HottKeyboard == 8) { LIBFC_HoTT_Clear(); page = 2; line = 0;}; |
348 | if(HottKeyboard == 1) { LIBFC_HoTT_Clear(); page = 0; line = 0;}; |
||
1921 | holgerb | 349 | HottKeyboard = 0; |
350 | break; |
||
1933 | holgerb | 351 | default: line = 0; |
1921 | holgerb | 352 | break; |
353 | } |
||
354 | else |
||
1939 | holgerb | 355 | if(page == 2) |
1933 | holgerb | 356 | switch(line++) |
1921 | holgerb | 357 | { |
358 | case 0: |
||
359 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name); |
||
360 | break; |
||
361 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
||
362 | break; |
||
1923 | holgerb | 363 | case 2: HoTT_printfxy(0,2,"ALT:"); |
1921 | holgerb | 364 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
365 | { |
||
366 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
||
367 | else |
||
368 | { |
||
369 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
||
370 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
||
371 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
||
372 | } |
||
373 | } |
||
374 | else |
||
375 | HoTT_printf("DISABLED"); |
||
376 | break; |
||
1923 | holgerb | 377 | case 3: HoTT_printfxy(0,3,"CF:"); |
1921 | holgerb | 378 | if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED") |
379 | else |
||
380 | { |
||
381 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
||
382 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
||
383 | } |
||
384 | break; |
||
1923 | holgerb | 385 | case 4: HoTT_printfxy(0,4,"GPS:"); |
386 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
||
387 | else |
||
388 | { |
||
389 | CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl); |
||
390 | if(tmp < 50) HoTT_printf("(FREE)") |
||
391 | else |
||
392 | if(tmp >= 180) HoTT_printf("(HOME)") |
||
393 | else |
||
394 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
||
395 | else HoTT_printf("(HOLD)") |
||
396 | } |
||
397 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
||
398 | |||
399 | break; |
||
400 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
||
401 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
||
402 | break; |
||
1921 | holgerb | 403 | case 6: |
1923 | holgerb | 404 | HoTT_printfxy(0,6,"Ni:%4i Ro:%4i C:%3i",PPM_in[EE_Parameter.Kanalbelegung[K_NICK]],PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]], Parameter_ServoNickControl); |
1933 | holgerb | 405 | HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
1921 | holgerb | 406 | break; |
407 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
||
408 | if(HoTTBlink) |
||
409 | { |
||
410 | LIBFC_HoTT_SetPos(6 * 21); |
||
411 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
||
412 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
||
413 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
||
414 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
||
415 | } |
||
416 | break; |
||
417 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
||
418 | break; |
||
419 | case 9: |
||
420 | case 10: |
||
421 | case 11: |
||
422 | case 12: |
||
423 | case 13: |
||
424 | case 14: |
||
425 | case 15: |
||
426 | case 16: |
||
1939 | holgerb | 427 | if(HottKeyboard == 1) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
1921 | holgerb | 428 | HottKeyboard = 0; |
429 | break; |
||
1933 | holgerb | 430 | default: line = 0; |
1917 | holgerb | 431 | break; |
432 | } |
||
1921 | holgerb | 433 | else page = 0; |
1917 | holgerb | 434 | } |
435 | |||
1925 | holgerb | 436 | #endif |
1917 | holgerb | 437 | |
438 | |||
439 |