Rev 1941 | Rev 1943 | Go to most recent revision | Details | Compare with Previous | 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 | //--------------------------------------------------------------- |
||
1942 | holgerb | 66 | void NC_Fills_HoTT_Telemety(void) |
1940 | holgerb | 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 | |||
1942 | holgerb | 95 | unsigned int BuildHoTT_Vario(void) |
96 | { |
||
97 | unsigned int tmp; |
||
98 | if(WaypointTrimming == 0) |
||
99 | { |
||
100 | tmp = 30000 + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3; |
||
101 | if(tmp < 30000 && tmp > 30000 - 50) tmp = 30000 - 50; // weil es erst bei < 0,5m/sek piept |
||
102 | } |
||
103 | else |
||
104 | if(WaypointTrimming > 0) tmp = 30000 + FromNC_AltitudeSpeed * 10; |
||
105 | else tmp = 30000 - FromNC_AltitudeSpeed * 10; |
||
106 | return(tmp); |
||
107 | } |
||
108 | |||
1940 | holgerb | 109 | //--------------------------------------------------------------- |
1919 | holgerb | 110 | unsigned char HoTT_Telemety(unsigned char packet_request) |
111 | { |
||
1942 | holgerb | 112 | static unsigned char search = 0,max,min,tmp_max,tmp_min; |
113 | |||
1919 | holgerb | 114 | switch(packet_request) |
115 | { |
||
116 | case HOTT_VARIO_PACKET_ID: |
||
1921 | holgerb | 117 | VarioPacket.Altitude = HoehenWert/100 + 500; |
1942 | holgerb | 118 | VarioPacket.m_sec = BuildHoTT_Vario(); |
1940 | holgerb | 119 | GPSPacket.m_3sec = 120; |
120 | GPSPacket.m_10sec = 120; |
||
1919 | holgerb | 121 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
122 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
||
123 | VarioPacket.WarnBeep = HoTT_Waring(); |
||
124 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
||
125 | return(sizeof(VarioPacket)); |
||
126 | break; |
||
1921 | holgerb | 127 | |
1919 | holgerb | 128 | case HOTT_GPS_PACKET_ID: |
1921 | holgerb | 129 | GPSPacket.Altitude = HoehenWert/100 + 500; |
1940 | holgerb | 130 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; |
131 | // GPSPacket.Heading = GPSInfo.HomeBearing/2;//KompassValue/2; |
||
132 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; |
||
1942 | holgerb | 133 | GPSPacket.m_sec = BuildHoTT_Vario(); |
1921 | holgerb | 134 | GPSPacket.m_3sec = 120; |
135 | GPSPacket.m_10sec = 0; |
||
1919 | holgerb | 136 | GPSPacket.WarnBeep = HoTT_Waring(); |
137 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
||
138 | return(sizeof(GPSPacket)); |
||
139 | break; |
||
140 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
||
1942 | holgerb | 141 | |
142 | if(Motor[search].Temperature > tmp_max) tmp_max = Motor[search].Temperature; |
||
143 | else |
||
144 | if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature; |
||
145 | if(++search > MAX_MOTORS) |
||
146 | { |
||
147 | search = 0; |
||
148 | if(tmp_min != 255) min = tmp_min; else min = 0; |
||
149 | max = tmp_max; |
||
150 | tmp_min = 255; |
||
151 | tmp_max = 0; |
||
152 | } |
||
1940 | holgerb | 153 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
1921 | holgerb | 154 | ElectricAirPacket.Battery1 = UBat; |
1940 | holgerb | 155 | ElectricAirPacket.Battery2 = UBat; |
1942 | holgerb | 156 | ElectricAirPacket.m_sec = BuildHoTT_Vario(); |
1940 | holgerb | 157 | ElectricAirPacket.m_3sec = 120; |
158 | ElectricAirPacket.InputVoltage = UBat; |
||
1942 | holgerb | 159 | ElectricAirPacket.Temperature1 = min + 20; |
160 | ElectricAirPacket.Temperature2 = max + 20; |
||
1940 | holgerb | 161 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
1919 | holgerb | 162 | ElectricAirPacket.WarnBeep = HoTT_Waring(); |
1940 | holgerb | 163 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
1919 | holgerb | 164 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
165 | return(sizeof(ElectricAirPacket)); |
||
166 | break; |
||
167 | default: return(0); |
||
168 | } |
||
169 | } |
||
170 | |||
171 | //--------------------------------------------------------------- |
||
1917 | holgerb | 172 | void HoTT_Menu(void) |
173 | { |
||
1933 | holgerb | 174 | static unsigned char line, page = 0; |
1921 | holgerb | 175 | unsigned char tmp; |
176 | if(page == 0) |
||
1933 | holgerb | 177 | switch(line++) |
1917 | holgerb | 178 | { |
1919 | holgerb | 179 | case 0: |
1923 | holgerb | 180 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
1939 | holgerb | 181 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
182 | else |
||
183 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
||
184 | |||
185 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
||
186 | { |
||
187 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
||
188 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
||
189 | } |
||
190 | else HoTT_printfxy(10,0,"ALT:---- "); |
||
191 | break; |
||
192 | case 1: |
||
193 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
194 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
||
195 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
||
1941 | holgerb | 196 | HoTT_printfxy(10,1,"DIR: %3d%c",ErsatzKompassInGrad, HoTT_GRAD); |
1939 | holgerb | 197 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy(20,1,"C") else HoTT_printfxy(20,1," "); |
198 | break; |
||
199 | case 2: |
||
200 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
201 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
||
202 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
||
1940 | holgerb | 203 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
1939 | holgerb | 204 | break; |
205 | case 3: |
||
206 | HoTT_printfxy(9,0,"I"); |
||
207 | HoTT_printfxy(9,1,"I"); |
||
208 | HoTT_printfxy(9,2,"I"); |
||
209 | HoTT_printfxy(0,3,"---------+-----------"); |
||
210 | HoTT_printfxy(0,6,"---------------------"); |
||
211 | break; |
||
212 | case 4: |
||
213 | if(NaviDataOkay) |
||
214 | { |
||
1940 | holgerb | 215 | HoTT_printfxy(9,4,"I"); |
1939 | holgerb | 216 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
217 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
||
218 | switch (GPSInfo.SatFix) |
||
219 | { |
||
220 | case SATFIX_3D: |
||
221 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
||
222 | else HoTT_printfxy(7,4,"3D"); |
||
223 | break; |
||
224 | default: |
||
225 | HoTT_printfxy(7,4,"! "); |
||
226 | break; |
||
227 | } |
||
228 | } |
||
229 | else |
||
230 | { //012345678901234567890 |
||
1940 | holgerb | 231 | Hott_ClearLine(4); |
1939 | holgerb | 232 | } |
233 | break; |
||
234 | case 5: |
||
235 | if(NaviDataOkay) |
||
236 | { |
||
1940 | holgerb | 237 | HoTT_printfxy(9,5,"I"); |
1939 | holgerb | 238 | HoTT_printfxy(4,5,"%2um/s",GPSInfo.Speed,GPSInfo.NumOfSats); |
239 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
||
240 | } |
||
1940 | holgerb | 241 | else Hott_ClearLine(5); |
1939 | holgerb | 242 | break; |
243 | case 6: |
||
244 | /* |
||
245 | if(RequiredMotors == 4) Hott_ClearLine(6); |
||
246 | else |
||
247 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
||
248 | else |
||
249 | 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); |
||
250 | //HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard); |
||
251 | */ |
||
252 | break; |
||
253 | case 7: if(NC_ErrorCode) |
||
254 | { |
||
255 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
||
256 | { |
||
257 | Hott_ClearLine(7); |
||
258 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
||
259 | } |
||
260 | else |
||
261 | { |
||
262 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
||
263 | } |
||
264 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
||
265 | break; |
||
266 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
||
267 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
||
268 | case 9: |
||
269 | case 10: |
||
270 | case 11: |
||
271 | case 12: |
||
272 | case 13: |
||
273 | case 14: |
||
274 | case 15: |
||
275 | case 16: |
||
276 | if(HottKeyboard == 8) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
||
277 | HottKeyboard = 0; |
||
278 | break; |
||
279 | default: line = 0; |
||
280 | break; |
||
281 | } |
||
282 | else |
||
283 | if(page == 1) |
||
284 | switch(line++) |
||
285 | { |
||
286 | case 0: |
||
287 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
||
1923 | holgerb | 288 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
289 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
||
1917 | holgerb | 290 | break; |
291 | case 1: |
||
1921 | holgerb | 292 | HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD); |
1917 | holgerb | 293 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
1920 | holgerb | 294 | { |
295 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
||
296 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
||
297 | } |
||
298 | else HoTT_printfxy(10,1,"ALT:---- "); |
||
299 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
||
1917 | holgerb | 300 | break; |
301 | case 2: |
||
302 | if(NaviDataOkay) |
||
303 | { |
||
1923 | holgerb | 304 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
1917 | holgerb | 305 | } |
306 | else |
||
307 | { |
||
1923 | holgerb | 308 | Hott_ClearLine(2); |
1917 | holgerb | 309 | } |
310 | break; |
||
1923 | holgerb | 311 | case 3: |
312 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
||
313 | break; |
||
1917 | holgerb | 314 | case 4: |
315 | if(NaviDataOkay) |
||
316 | { |
||
1919 | holgerb | 317 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
1917 | holgerb | 318 | switch (GPSInfo.SatFix) |
319 | { |
||
320 | case SATFIX_3D: |
||
321 | HoTT_printfxy(16,4," 3D "); |
||
322 | break; |
||
1925 | holgerb | 323 | //case SATFIX_2D: |
324 | //case SATFIX_NONE: |
||
1917 | holgerb | 325 | default: |
1925 | holgerb | 326 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
1917 | holgerb | 327 | break; |
328 | } |
||
329 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
||
330 | { |
||
331 | HoTT_printfxy(16,4,"DGPS "); |
||
332 | } |
||
333 | } |
||
334 | else |
||
335 | { //012345678901234567890 |
||
1930 | holgerb | 336 | HoTT_printfxy(0,4," No NaviCtrl "); |
1917 | holgerb | 337 | } |
338 | break; |
||
339 | case 5: |
||
1923 | holgerb | 340 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
341 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(18,5,"CF") else HoTT_printfxy(18,5," "); |
||
1917 | holgerb | 342 | break; |
343 | case 6: |
||
344 | if(RequiredMotors == 4) Hott_ClearLine(6); |
||
345 | else |
||
1923 | holgerb | 346 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
1917 | holgerb | 347 | else |
1923 | holgerb | 348 | 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 | 349 | //HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard); |
1917 | holgerb | 350 | break; |
1930 | holgerb | 351 | case 7: if(NC_ErrorCode) |
352 | { |
||
353 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
||
354 | { |
||
355 | Hott_ClearLine(7); |
||
356 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
||
357 | } |
||
358 | else |
||
359 | { |
||
360 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
||
361 | } |
||
1937 | holgerb | 362 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
1917 | holgerb | 363 | break; |
1919 | holgerb | 364 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
365 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
||
1921 | holgerb | 366 | case 9: |
1917 | holgerb | 367 | case 10: |
368 | case 11: |
||
369 | case 12: |
||
370 | case 13: |
||
1919 | holgerb | 371 | case 14: |
372 | case 15: |
||
373 | case 16: |
||
1939 | holgerb | 374 | if(HottKeyboard == 8) { LIBFC_HoTT_Clear(); page = 2; line = 0;}; |
375 | if(HottKeyboard == 1) { LIBFC_HoTT_Clear(); page = 0; line = 0;}; |
||
1921 | holgerb | 376 | HottKeyboard = 0; |
377 | break; |
||
1933 | holgerb | 378 | default: line = 0; |
1921 | holgerb | 379 | break; |
380 | } |
||
381 | else |
||
1939 | holgerb | 382 | if(page == 2) |
1933 | holgerb | 383 | switch(line++) |
1921 | holgerb | 384 | { |
385 | case 0: |
||
386 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name); |
||
387 | break; |
||
388 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
||
389 | break; |
||
1923 | holgerb | 390 | case 2: HoTT_printfxy(0,2,"ALT:"); |
1921 | holgerb | 391 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
392 | { |
||
393 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
||
394 | else |
||
395 | { |
||
396 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
||
397 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
||
398 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
||
399 | } |
||
400 | } |
||
401 | else |
||
402 | HoTT_printf("DISABLED"); |
||
403 | break; |
||
1923 | holgerb | 404 | case 3: HoTT_printfxy(0,3,"CF:"); |
1921 | holgerb | 405 | if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED") |
406 | else |
||
407 | { |
||
408 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
||
409 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
||
410 | } |
||
411 | break; |
||
1923 | holgerb | 412 | case 4: HoTT_printfxy(0,4,"GPS:"); |
413 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
||
414 | else |
||
415 | { |
||
416 | CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl); |
||
417 | if(tmp < 50) HoTT_printf("(FREE)") |
||
418 | else |
||
419 | if(tmp >= 180) HoTT_printf("(HOME)") |
||
420 | else |
||
421 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
||
422 | else HoTT_printf("(HOLD)") |
||
423 | } |
||
424 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
||
425 | |||
426 | break; |
||
427 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
||
428 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
||
429 | break; |
||
1921 | holgerb | 430 | case 6: |
1923 | holgerb | 431 | 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 | 432 | 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 | 433 | break; |
434 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
||
435 | if(HoTTBlink) |
||
436 | { |
||
437 | LIBFC_HoTT_SetPos(6 * 21); |
||
438 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
||
439 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
||
440 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
||
441 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
||
442 | } |
||
443 | break; |
||
444 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
||
445 | break; |
||
446 | case 9: |
||
447 | case 10: |
||
448 | case 11: |
||
449 | case 12: |
||
450 | case 13: |
||
451 | case 14: |
||
452 | case 15: |
||
453 | case 16: |
||
1939 | holgerb | 454 | if(HottKeyboard == 1) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
1921 | holgerb | 455 | HottKeyboard = 0; |
456 | break; |
||
1933 | holgerb | 457 | default: line = 0; |
1917 | holgerb | 458 | break; |
459 | } |
||
1921 | holgerb | 460 | else page = 0; |
1917 | holgerb | 461 | } |
462 | |||
1925 | holgerb | 463 | #endif |
1917 | holgerb | 464 | |
465 | |||
466 |