Rev 2072 | Rev 2091 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2072 | Rev 2090 | ||
---|---|---|---|
1 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 | // + www.MikroKopter.com |
2 | // + www.MikroKopter.com |
3 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
4 | // + Software Nutzungsbedingungen (english version: see below) |
4 | // + Software Nutzungsbedingungen (english version: see below) |
5 | // + der Fa. HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland - nachfolgend Lizenzgeber genannt - |
5 | // + der Fa. HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland - nachfolgend Lizenzgeber genannt - |
6 | // + Der Lizenzgeber räumt dem Kunden ein nicht-ausschließliches, zeitlich und räumlich* unbeschränktes Recht ein, die im den |
6 | // + Der Lizenzgeber räumt dem Kunden ein nicht-ausschließliches, zeitlich und räumlich* unbeschränktes Recht ein, die im den |
7 | // + Mikrocontroller verwendete Firmware für die Hardware Flight-Ctrl, Navi-Ctrl, BL-Ctrl, MK3Mag & PC-Programm MikroKopter-Tool |
7 | // + Mikrocontroller verwendete Firmware für die Hardware Flight-Ctrl, Navi-Ctrl, BL-Ctrl, MK3Mag & PC-Programm MikroKopter-Tool |
8 | // + - nachfolgend Software genannt - nur für private Zwecke zu nutzen. |
8 | // + - nachfolgend Software genannt - nur für private Zwecke zu nutzen. |
9 | // + Der Einsatz dieser Software ist nur auf oder mit Produkten des Lizenzgebers zulässig. |
9 | // + Der Einsatz dieser Software ist nur auf oder mit Produkten des Lizenzgebers zulässig. |
10 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
10 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
11 | // + Die vom Lizenzgeber gelieferte Software ist urheberrechtlich geschützt. Alle Rechte an der Software sowie an sonstigen im |
11 | // + Die vom Lizenzgeber gelieferte Software ist urheberrechtlich geschützt. Alle Rechte an der Software sowie an sonstigen im |
12 | // + Rahmen der Vertragsanbahnung und Vertragsdurchführung überlassenen Unterlagen stehen im Verhältnis der Vertragspartner ausschließlich dem Lizenzgeber zu. |
12 | // + Rahmen der Vertragsanbahnung und Vertragsdurchführung überlassenen Unterlagen stehen im Verhältnis der Vertragspartner ausschließlich dem Lizenzgeber zu. |
13 | // + Die in der Software enthaltenen Copyright-Vermerke, Markenzeichen, andere Rechtsvorbehalte, Seriennummern sowie |
13 | // + Die in der Software enthaltenen Copyright-Vermerke, Markenzeichen, andere Rechtsvorbehalte, Seriennummern sowie |
14 | // + sonstige der Programmidentifikation dienenden Merkmale dürfen vom Kunden nicht verändert oder unkenntlich gemacht werden. |
14 | // + sonstige der Programmidentifikation dienenden Merkmale dürfen vom Kunden nicht verändert oder unkenntlich gemacht werden. |
15 | // + Der Kunde trifft angemessene Vorkehrungen für den sicheren Einsatz der Software. Er wird die Software gründlich auf deren |
15 | // + Der Kunde trifft angemessene Vorkehrungen für den sicheren Einsatz der Software. Er wird die Software gründlich auf deren |
16 | // + Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
16 | // + Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
17 | // + Die Haftung des Lizenzgebers wird - soweit gesetzlich zulässig - begrenzt in Höhe des typischen und vorhersehbaren |
17 | // + Die Haftung des Lizenzgebers wird - soweit gesetzlich zulässig - begrenzt in Höhe des typischen und vorhersehbaren |
18 | // + Schadens. Die gesetzliche Haftung bei Personenschäden und nach dem Produkthaftungsgesetz bleibt unberührt. Dem Lizenzgeber steht jedoch der Einwand |
18 | // + Schadens. Die gesetzliche Haftung bei Personenschäden und nach dem Produkthaftungsgesetz bleibt unberührt. Dem Lizenzgeber steht jedoch der Einwand |
19 | // + des Mitverschuldens offen. |
19 | // + des Mitverschuldens offen. |
20 | // + Der Kunde trifft angemessene Vorkehrungen für den Fall, dass die Software ganz oder teilweise nicht ordnungsgemäß arbeitet. |
20 | // + Der Kunde trifft angemessene Vorkehrungen für den Fall, dass die Software ganz oder teilweise nicht ordnungsgemäß arbeitet. |
21 | // + Er wird die Software gründlich auf deren Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
21 | // + Er wird die Software gründlich auf deren Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
22 | // + Der Kunde wird er seine Daten vor Einsatz der Software nach dem Stand der Technik sichern. |
22 | // + Der Kunde wird er seine Daten vor Einsatz der Software nach dem Stand der Technik sichern. |
23 | // + Der Kunde ist darüber unterrichtet, dass der Lizenzgeber seine Daten im zur Vertragsdurchführung erforderlichen Umfang |
23 | // + Der Kunde ist darüber unterrichtet, dass der Lizenzgeber seine Daten im zur Vertragsdurchführung erforderlichen Umfang |
24 | // + und auf Grundlage der Datenschutzvorschriften erhebt, speichert, verarbeitet und, sofern notwendig, an Dritte übermittelt. |
24 | // + und auf Grundlage der Datenschutzvorschriften erhebt, speichert, verarbeitet und, sofern notwendig, an Dritte übermittelt. |
25 | // + *) Die räumliche Nutzung bezieht sich nur auf den Einsatzort, nicht auf die Reichweite der programmierten Software. |
25 | // + *) Die räumliche Nutzung bezieht sich nur auf den Einsatzort, nicht auf die Reichweite der programmierten Software. |
26 | // + #### ENDE DER NUTZUNGSBEDINGUNGEN ####' |
26 | // + #### ENDE DER NUTZUNGSBEDINGUNGEN ####' |
27 | // + Hinweis: Informationen über erweiterte Nutzungsrechte (wie z.B. Nutzung für nicht-private Zwecke) sind auf Anfrage per Email an info(@)hisystems.de verfügbar. |
27 | // + Hinweis: Informationen über erweiterte Nutzungsrechte (wie z.B. Nutzung für nicht-private Zwecke) sind auf Anfrage per Email an info(@)hisystems.de verfügbar. |
28 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
28 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
29 | // + Software LICENSING TERMS |
29 | // + Software LICENSING TERMS |
30 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
30 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
31 | // + of HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland, Germany - the Licensor - |
31 | // + of HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland, Germany - the Licensor - |
32 | // + The Licensor grants the customer a non-exclusive license to use the microcontroller firmware of the Flight-Ctrl, Navi-Ctrl, BL-Ctrl, and MK3Mag hardware |
32 | // + The Licensor grants the customer a non-exclusive license to use the microcontroller firmware of the Flight-Ctrl, Navi-Ctrl, BL-Ctrl, and MK3Mag hardware |
33 | // + (the Software) exclusively for private purposes. The License is unrestricted with respect to time and territory*. |
33 | // + (the Software) exclusively for private purposes. The License is unrestricted with respect to time and territory*. |
34 | // + The Software may only be used with the Licensor's products. |
34 | // + The Software may only be used with the Licensor's products. |
35 | // + The Software provided by the Licensor is protected by copyright. With respect to the relationship between the parties to this |
35 | // + The Software provided by the Licensor is protected by copyright. With respect to the relationship between the parties to this |
36 | // + agreement, all rights pertaining to the Software and other documents provided during the preparation and execution of this |
36 | // + agreement, all rights pertaining to the Software and other documents provided during the preparation and execution of this |
37 | // + agreement shall be the property of the Licensor. |
37 | // + agreement shall be the property of the Licensor. |
38 | // + The information contained in the Software copyright notices, trademarks, other legal reservations, serial numbers and other |
38 | // + The information contained in the Software copyright notices, trademarks, other legal reservations, serial numbers and other |
39 | // + features that can be used to identify the program may not be altered or defaced by the customer. |
39 | // + features that can be used to identify the program may not be altered or defaced by the customer. |
40 | // + The customer shall be responsible for taking reasonable precautions |
40 | // + The customer shall be responsible for taking reasonable precautions |
41 | // + for the safe use of the Software. The customer shall test the Software thoroughly regarding its suitability for the |
41 | // + for the safe use of the Software. The customer shall test the Software thoroughly regarding its suitability for the |
42 | // + intended purpose before implementing it for actual operation. The Licensor's liability shall be limited to the extent of typical and |
42 | // + intended purpose before implementing it for actual operation. The Licensor's liability shall be limited to the extent of typical and |
43 | // + foreseeable damage to the extent permitted by law, notwithstanding statutory liability for bodily injury and product |
43 | // + foreseeable damage to the extent permitted by law, notwithstanding statutory liability for bodily injury and product |
44 | // + liability. However, the Licensor shall be entitled to the defense of contributory negligence. |
44 | // + liability. However, the Licensor shall be entitled to the defense of contributory negligence. |
45 | // + The customer will take adequate precautions in the case, that the software is not working properly. The customer will test |
45 | // + The customer will take adequate precautions in the case, that the software is not working properly. The customer will test |
46 | // + the software for his purpose before any operational usage. The customer will backup his data before using the software. |
46 | // + the software for his purpose before any operational usage. The customer will backup his data before using the software. |
47 | // + The customer understands that the Licensor collects, stores and processes, and, where required, forwards, customer data |
47 | // + The customer understands that the Licensor collects, stores and processes, and, where required, forwards, customer data |
48 | // + to third parties to the extent necessary for executing the agreement, subject to applicable data protection and privacy regulations. |
48 | // + to third parties to the extent necessary for executing the agreement, subject to applicable data protection and privacy regulations. |
49 | // + *) The territory aspect only refers to the place where the Software is used, not its programmed range. |
49 | // + *) The territory aspect only refers to the place where the Software is used, not its programmed range. |
50 | // + #### END OF LICENSING TERMS #### |
50 | // + #### END OF LICENSING TERMS #### |
51 | // + Note: For information on license extensions (e.g. commercial use), please contact us at info(@)hisystems.de. |
51 | // + Note: For information on license extensions (e.g. commercial use), please contact us at info(@)hisystems.de. |
52 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
52 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
53 | #include "libfc.h" |
53 | #include "libfc.h" |
54 | #include "printf_P.h" |
54 | #include "printf_P.h" |
55 | #include "main.h" |
55 | #include "main.h" |
56 | #include "spi.h" |
56 | #include "spi.h" |
57 | #include "capacity.h" |
57 | #include "capacity.h" |
58 | 58 | ||
59 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
59 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
60 | 60 | ||
61 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
61 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
62 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
62 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
63 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
63 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
64 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
64 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
65 | #define HoTT_printf_BLINK(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
65 | #define HoTT_printf_BLINK(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
66 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
66 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
67 | 67 | ||
68 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
68 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
69 | #define VOICE_BEEP 5 |
69 | #define VOICE_BEEP 5 |
70 | #define HoTT_GRAD 96 |
70 | #define HoTT_GRAD 96 |
71 | #define HoTT_LINKS 123 |
71 | #define HoTT_LINKS 123 |
72 | #define HoTT_RECHTS 124 |
72 | #define HoTT_RECHTS 124 |
73 | #define HoTT_OBEN 125 |
73 | #define HoTT_OBEN 125 |
74 | #define HoTT_UNTEN 126 |
74 | #define HoTT_UNTEN 126 |
75 | 75 | ||
76 | #define HOTT_KEY_RIGHT 1 |
76 | #define HOTT_KEY_RIGHT 1 |
77 | #define HOTT_KEY_DOWN 2 |
77 | #define HOTT_KEY_DOWN 2 |
78 | #define HOTT_KEY_UP 4 |
78 | #define HOTT_KEY_UP 4 |
79 | #define HOTT_KEY_SET 6 |
79 | #define HOTT_KEY_SET 6 |
80 | #define HOTT_KEY_LEFT 8 |
80 | #define HOTT_KEY_LEFT 8 |
81 | 81 | ||
82 | GPSPacket_t GPSPacket; |
82 | GPSPacket_t GPSPacket; |
83 | VarioPacket_t VarioPacket; |
83 | VarioPacket_t VarioPacket; |
84 | ASCIIPacket_t ASCIIPacket; |
84 | ASCIIPacket_t ASCIIPacket; |
85 | ElectricAirPacket_t ElectricAirPacket; |
85 | ElectricAirPacket_t ElectricAirPacket; |
86 | HoTTGeneral_t HoTTGeneral; |
86 | HoTTGeneral_t HoTTGeneral; |
- | 87 | unsigned char SpeakHoTT = SPEAK_MIKROKOPTER; |
|
87 | int HoTTVarioMeter = 0; |
88 | int HoTTVarioMeter = 0; |
88 | - | ||
- | 89 | const char PROGMEM MIKROKOPTER[] = {" MikroKopter "}; |
|
89 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
90 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
90 | { |
91 | { |
91 | //0123456789123456 |
92 | //0123456789123456 |
92 | "No Error \0", // 0 |
93 | "No Error \0", // 0 |
93 | "Not compatible \0", // 1 |
94 | "Not compatible \0", // 1 |
94 | "MK3Mag not compa\0", // 2 |
95 | "MK3Mag not compa\0", // 2 |
95 | "No FC communicat\0", // 3 |
96 | "No FC communicat\0", // 3 |
96 | "MK3Mag communica\0", // 4 |
97 | "MK3Mag communica\0", // 4 |
97 | "GPS communicatio\0", // 5 |
98 | "GPS communicatio\0", // 5 |
98 | "compass value \0", // 6 |
99 | "compass value \0", // 6 |
99 | "RC Signal lost \0", // 7 |
100 | "RC Signal lost \0", // 7 |
100 | "FC spi rx error \0", // 8 |
101 | "FC spi rx error \0", // 8 |
101 | "No NC communicat\0", // 9 |
102 | "No NC communicat\0", // 9 |
102 | "FC Nick Gyro \0", // 10 |
103 | "FC Nick Gyro \0", // 10 |
103 | "FC Roll Gyro \0", // 11 |
104 | "FC Roll Gyro \0", // 11 |
104 | "FC Yaw Gyro \0", // 12 |
105 | "FC Yaw Gyro \0", // 12 |
105 | "FC Nick ACC \0", // 13 |
106 | "FC Nick ACC \0", // 13 |
106 | "FC Roll ACC \0", // 14 |
107 | "FC Roll ACC \0", // 14 |
107 | "FC Z-ACC \0", // 15 |
108 | "FC Z-ACC \0", // 15 |
108 | "Pressure sensor \0", // 16 |
109 | "Pressure sensor \0", // 16 |
109 | "I2C FC->BL-Ctrl \0", // 17 |
110 | "I2C FC->BL-Ctrl \0", // 17 |
110 | "Bl Missing \0", // 18 |
111 | "Bl Missing \0", // 18 |
111 | "Mixer Error \0", // 19 |
112 | "Mixer Error \0", // 19 |
112 | "Carefree Error \0", // 20 |
113 | "Carefree Error \0", // 20 |
113 | "GPS Fix lost \0", // 21 |
114 | "GPS Fix lost \0", // 21 |
114 | "Magnet Error \0", // 22 |
115 | "Magnet Error \0", // 22 |
115 | "Motor restart \0", // 23 |
116 | "Motor restart \0", // 23 |
116 | "BL Limitation \0", // 24 |
117 | "BL Limitation \0", // 24 |
117 | "GPS Range \0", // 25 |
118 | "GPS Range \0", // 25 |
118 | "No SD-Card \0", // 26 |
119 | "No SD-Card \0", // 26 |
119 | "SD-Logging error\0", // 27 |
120 | "SD-Logging error\0", // 27 |
120 | "Flying range! \0", // 28 |
121 | "Flying range! \0", // 28 |
121 | "Max Altitude! \0" // 29 |
122 | "Max Altitude! \0" // 29 |
122 | }; |
123 | }; |
- | 124 | ||
- | 125 | ||
- | 126 | const char PROGMEM HOTT_ERROR[MAX_ERR_NUMBER][2] = |
|
- | 127 | { // 1 -> only in flight 0 -> also on ground |
|
- | 128 | //0123456789123456 |
|
- | 129 | {0,0},// "No Error \0", // 0 |
|
- | 130 | {SPEAK_ERROR,0},// "Not compatible \0", // 1 |
|
- | 131 | {SPEAK_ERROR,0},// "MK3Mag not compa\0", // 2 |
|
- | 132 | {SPEAK_ERR_NAVI,1},// "No FC communicat\0", // 3 |
|
- | 133 | {SPEAK_ERR_COMPASS,1},// "MK3Mag communica\0", // 4 |
|
- | 134 | {SPEAK_ERR_GPS,0},// "GPS communicatio\0", // 5 |
|
- | 135 | {SPEAK_ERR_COMPASS,1},// "compass value \0", // 6 |
|
- | 136 | {SPEAK_ERR_RECEICER,0},// "RC Signal lost \0", // 7 |
|
- | 137 | {SPEAK_ERR_NAVI,0},// "FC spi rx error \0", // 8 |
|
- | 138 | {SPEAK_ERR_NAVI,0},// "No NC communicat\0", // 9 |
|
- | 139 | {SPEAK_ERR_SENSOR,0},// "FC Nick Gyro \0", // 10 |
|
- | 140 | {SPEAK_ERR_SENSOR,0},// "FC Roll Gyro \0", // 11 |
|
- | 141 | {SPEAK_ERR_SENSOR,0},// "FC Yaw Gyro \0", // 12 |
|
- | 142 | {SPEAK_ERR_SENSOR,0},// "FC Nick ACC \0", // 13 |
|
- | 143 | {SPEAK_ERR_SENSOR,0},// "FC Roll ACC \0", // 14 |
|
- | 144 | {SPEAK_ERR_SENSOR,0},// "FC Z-ACC \0", // 15 |
|
- | 145 | {SPEAK_ERR_SENSOR,0},// "Pressure sensor \0", // 16 |
|
- | 146 | {SPEAK_ERR_DATABUS,1},// "I2C FC->BL-Ctrl \0", // 17 |
|
- | 147 | {SPEAK_ERR_DATABUS,1},// "Bl Missing \0", // 18 |
|
- | 148 | {SPEAK_ERROR,0},// "Mixer Error \0", // 19 |
|
- | 149 | {SPEAK_CF_OFF,1},// "Carefree Error \0", // 20 |
|
- | 150 | {SPEAK_GPS_FIX,1},// "GPS Fix lost \0", // 21 |
|
- | 151 | {SPEAK_ERR_COMPASS,0},// "Magnet Error \0", // 22 |
|
- | 152 | {SPEAK_ERR_MOTOR,1},// "Motor restart \0", // 23 |
|
- | 153 | {SPEAK_MAX_TEMPERAT,1},// "BL Limitation \0", // 24 |
|
- | 154 | {SPEAK_MAX_RANGE,1},// "GPS Range \0", // 25 |
|
- | 155 | {SPEAK_ERROR,1},// "No SD-Card \0", // 26 |
|
- | 156 | {SPEAK_ERROR,1},// "SD-Logging error\0", // 27 |
|
- | 157 | {SPEAK_MAX_RANGE,1},// "Flying range! \0", // 28 |
|
- | 158 | {SPEAK_MAX_ALTITUD,1}// "Max Altitude! \0" // 29 |
|
- | 159 | }; |
|
- | 160 | ||
- | 161 | ||
123 | 162 | ||
124 | unsigned char MaxBlTempertaure = 0; |
163 | unsigned char MaxBlTempertaure = 0; |
125 | unsigned char MinBlTempertaure = 0; |
164 | unsigned char MinBlTempertaure = 0; |
126 | unsigned char HottestBl = 0; |
165 | unsigned char HottestBl = 0; |
127 | 166 | ||
128 | void GetHottestBl(void) |
167 | void GetHottestBl(void) |
129 | { |
168 | { |
130 | static unsigned char search = 0,tmp_max,tmp_min,who; |
169 | static unsigned char search = 0,tmp_max,tmp_min,who; |
131 | if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;} |
170 | if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;} |
132 | else |
171 | else |
133 | if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature; |
172 | if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature; |
134 | if(++search > MAX_MOTORS) |
173 | if(++search > MAX_MOTORS) |
135 | { |
174 | { |
136 | search = 0; |
175 | search = 0; |
137 | if(tmp_min != 255) MinBlTempertaure = tmp_min; else MinBlTempertaure = 0; |
176 | if(tmp_min != 255) MinBlTempertaure = tmp_min; else MinBlTempertaure = 0; |
138 | MaxBlTempertaure = tmp_max; |
177 | MaxBlTempertaure = tmp_max; |
139 | HottestBl = who; |
178 | HottestBl = who; |
140 | tmp_min = 255; |
179 | tmp_min = 255; |
141 | tmp_max = 0; |
180 | tmp_max = 0; |
142 | who = 0; |
181 | who = 0; |
143 | } |
182 | } |
144 | } |
183 | } |
145 | 184 | ||
146 | //--------------------------------------------------------------- |
185 | //--------------------------------------------------------------- |
147 | void Hott_ClearLine(unsigned char line) |
186 | void Hott_ClearLine(unsigned char line) |
148 | { |
187 | { |
149 | HoTT_printfxy(0,line," "); |
188 | HoTT_printfxy(0,line," "); |
150 | } |
189 | } |
151 | //--------------------------------------------------------------- |
190 | //--------------------------------------------------------------- |
152 | 191 | ||
153 | unsigned char HoTT_Waring(void) |
192 | unsigned char HoTT_Waring(void) |
154 | { |
193 | { |
- | 194 | unsigned char status = 0; |
|
- | 195 | static char old_status = 0; |
|
- | 196 | static int repeat; |
|
- | 197 | //SpeakHoTT = 0; // zunächst noch nicht unterstützen |
|
- | 198 | DebugOut.Analog[16] = 0; |
|
- | 199 | if(Parameter_UserParam1) return(Parameter_UserParam1); |
|
155 | if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG); |
200 | if(FC_StatusFlags & FC_STATUS_LOWBAT) status = VOICE_MINIMALE_EINGANSSPANNUNG; |
- | 201 | else |
|
- | 202 | if(NC_ErrorCode) |
|
- | 203 | { |
|
- | 204 | if(MotorenEin || !pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][1])) status = pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][0]); |
|
- | 205 | } |
|
- | 206 | ||
- | 207 | if(!status) {status = SpeakHoTT; }; |
|
- | 208 | ||
- | 209 | if(old_status == status) |
|
- | 210 | { |
|
156 | if(MotorenEin && NC_ErrorCode) return(VOICE_BEEP); |
211 | if(!CheckDelay(repeat)) return(0); |
- | 212 | repeat = SetDelay(5000); |
|
- | 213 | } |
|
- | 214 | else repeat = SetDelay(2000); |
|
- | 215 | ||
- | 216 | if(status) |
|
- | 217 | { |
|
- | 218 | if(status == SpeakHoTT) SpeakHoTT = 0; |
|
- | 219 | } |
|
- | 220 | old_status = status; |
|
- | 221 | DebugOut.Analog[16] = status; |
|
157 | //if(Parameter_UserParam1) return(Parameter_UserParam1); |
222 | if(status) DebugOut.Analog[17]++; |
- | 223 | ||
158 | return(0); |
224 | return(status); |
159 | } |
225 | } |
160 | 226 | ||
161 | //--------------------------------------------------------------- |
227 | //--------------------------------------------------------------- |
162 | void NC_Fills_HoTT_Telemety(void) |
228 | void NC_Fills_HoTT_Telemety(void) |
163 | { |
229 | { |
164 | unsigned char *ptr = NULL; |
230 | unsigned char *ptr = NULL; |
165 | unsigned char max = 0,i,z; |
231 | unsigned char max = 0,i,z; |
166 | switch(FromNaviCtrl.Param.Byte[11]) |
232 | switch(FromNaviCtrl.Param.Byte[11]) |
167 | { |
233 | { |
168 | case HOTT_VARIO_PACKET_ID: |
234 | case HOTT_VARIO_PACKET_ID: |
169 | ptr = (unsigned char *) &VarioPacket; |
235 | ptr = (unsigned char *) &VarioPacket; |
170 | max = sizeof(VarioPacket); |
236 | max = sizeof(VarioPacket); |
171 | break; |
237 | break; |
172 | case HOTT_GPS_PACKET_ID: |
238 | case HOTT_GPS_PACKET_ID: |
173 | ptr = (unsigned char *) &GPSPacket; |
239 | ptr = (unsigned char *) &GPSPacket; |
174 | max = sizeof(GPSPacket); |
240 | max = sizeof(GPSPacket); |
175 | break; |
241 | break; |
176 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
242 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
177 | ptr = (unsigned char *) &ElectricAirPacket; |
243 | ptr = (unsigned char *) &ElectricAirPacket; |
178 | max = sizeof(ElectricAirPacket); |
244 | max = sizeof(ElectricAirPacket); |
179 | break; |
245 | break; |
180 | case HOTT_GENERAL_PACKET_ID: |
246 | case HOTT_GENERAL_PACKET_ID: |
181 | ptr = (unsigned char *) &HoTTGeneral; |
247 | ptr = (unsigned char *) &HoTTGeneral; |
182 | max = sizeof(HoTTGeneral); |
248 | max = sizeof(HoTTGeneral); |
183 | break; |
249 | break; |
184 | } |
250 | } |
185 | z = FromNaviCtrl.Param.Byte[0]; // Data allocation |
251 | z = FromNaviCtrl.Param.Byte[0]; // Data allocation |
186 | 252 | ||
187 | for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++) |
253 | for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++) |
188 | { |
254 | { |
189 | if(z >= max) break; |
255 | if(z >= max) break; |
190 | ptr[z] = FromNaviCtrl.Param.Byte[2+i]; |
256 | ptr[z] = FromNaviCtrl.Param.Byte[2+i]; |
191 | z++; |
257 | z++; |
192 | } |
258 | } |
193 | } |
259 | } |
194 | 260 | ||
195 | unsigned int BuildHoTT_Vario(void) |
261 | unsigned int BuildHoTT_Vario(void) |
196 | { |
262 | { |
197 | unsigned int tmp = 30000; |
263 | unsigned int tmp = 30000; |
198 | if(VarioCharacter == '+' || VarioCharacter == '-') |
264 | if(VarioCharacter == '+' || VarioCharacter == '-') |
199 | { |
265 | { |
200 | tmp = 30000 + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3; |
266 | tmp = 30000 + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3; |
201 | if(tmp < 30000 && tmp > 30000 - 50) tmp = 30000 - 50; // weil es sonst erst bei < 0,5m/sek piept |
267 | if(tmp < 30000 && tmp > 30000 - 50) tmp = 30000 - 50; // weil es sonst erst bei < 0,5m/sek piept |
202 | } |
268 | } |
203 | else |
269 | else |
204 | if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY)) |
270 | if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY)) |
205 | { |
271 | { |
206 | tmp = 30000 + HoTTVarioMeter; |
272 | tmp = 30000 + HoTTVarioMeter; |
207 | if(tmp > 30000) |
273 | if(tmp > 30000) |
208 | { |
274 | { |
209 | if(tmp < 30000 + 100) tmp = 30000; |
275 | if(tmp < 30000 + 100) tmp = 30000; |
210 | else tmp -= 100; |
276 | else tmp -= 100; |
211 | } |
277 | } |
212 | if(tmp < 30000) |
278 | if(tmp < 30000) |
213 | { |
279 | { |
214 | if(tmp > 30000 - 100) tmp = 30000; |
280 | if(tmp > 30000 - 100) tmp = 30000; |
215 | else tmp += 100; |
281 | else tmp += 100; |
216 | } |
282 | } |
217 | } |
283 | } |
218 | else |
284 | else |
219 | if(VarioCharacter == '^') tmp = 30000 + FromNC_AltitudeSpeed * 10; |
285 | if(VarioCharacter == '^') tmp = 30000 + FromNC_AltitudeSpeed * 10; |
220 | else |
286 | else |
221 | if(VarioCharacter == 'v') tmp = 30000 - FromNC_AltitudeSpeed * 10; |
287 | if(VarioCharacter == 'v') tmp = 30000 - FromNC_AltitudeSpeed * 10; |
222 | 288 | ||
223 | return(tmp); |
289 | return(tmp); |
224 | } |
290 | } |
225 | 291 | ||
226 | 292 | ||
227 | //--------------------------------------------------------------- |
293 | //--------------------------------------------------------------- |
228 | unsigned char HoTT_Telemety(unsigned char packet_request) |
294 | unsigned char HoTT_Telemety(unsigned char packet_request) |
229 | { |
295 | { |
- | 296 | unsigned char i; |
|
- | 297 | //Debug("rqst: %02X",packet_request); |
|
- | 298 | ||
230 | switch(packet_request) |
299 | switch(packet_request) |
231 | { |
300 | { |
232 | case HOTT_VARIO_PACKET_ID: |
301 | case HOTT_VARIO_PACKET_ID: |
233 | VarioPacket.Altitude = HoehenWert/100 + 500; |
302 | VarioPacket.Altitude = HoehenWert/100 + 500; |
234 | VarioPacket.m_sec = BuildHoTT_Vario(); |
303 | VarioPacket.m_sec = BuildHoTT_Vario(); |
235 | VarioPacket.m_3sec = VarioPacket.m_sec; |
304 | VarioPacket.m_3sec = VarioPacket.m_sec; |
236 | VarioPacket.m_10sec = VarioPacket.m_sec; |
305 | VarioPacket.m_10sec = VarioPacket.m_sec; |
237 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
306 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
238 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
307 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
239 | VarioPacket.WarnBeep = HoTT_Waring(); |
308 | VarioPacket.WarnBeep = 0;//HoTT_Waring(); |
240 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
309 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
- | 310 | VarioPacket.FreeCharacters[0] = VarioCharacter; |
|
- | 311 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) VarioPacket.FreeCharacters[1] = 'C'; else VarioPacket.FreeCharacters[1] = ' '; |
|
- | 312 | // VarioPacket.FreeCharacters[2] = ' '; |
|
- | 313 | if(NC_ErrorCode) |
|
- | 314 | { |
|
- | 315 | for(i=0; i<16;i++) VarioPacket.Text[i+4] = pgm_read_byte(&NC_ERROR_TEXT[NC_ErrorCode][i]); |
|
- | 316 | VarioPacket.Text[0] = NC_ErrorCode/10 + '0'; |
|
- | 317 | VarioPacket.Text[1] = NC_ErrorCode%10 + '0'; |
|
- | 318 | VarioPacket.Text[2] = ':'; |
|
- | 319 | } |
|
- | 320 | else for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i]); // no Error |
|
- | 321 | ||
241 | return(sizeof(VarioPacket)); |
322 | return(sizeof(VarioPacket)); |
242 | break; |
323 | break; |
243 | 324 | ||
244 | case HOTT_GPS_PACKET_ID: |
325 | case HOTT_GPS_PACKET_ID: |
245 | GPSPacket.Altitude = HoehenWert/100 + 500; |
326 | GPSPacket.Altitude = HoehenWert/100 + 500; |
246 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; // macht die NC |
327 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; // macht die NC |
247 | // GPSPacket.Heading = GPSInfo.HomeBearing/2; // macht die NC |
328 | // GPSPacket.Heading = GPSInfo.HomeBearing/2; // macht die NC |
248 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; // macht die NC |
329 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; // macht die NC |
249 | GPSPacket.m_sec = BuildHoTT_Vario(); |
330 | GPSPacket.m_sec = BuildHoTT_Vario(); |
250 | GPSPacket.m_3sec = 120; |
331 | GPSPacket.m_3sec = 120; |
251 | GPSPacket.m_10sec = 0; |
332 | GPSPacket.NumOfSats = GPSInfo.NumOfSats; |
252 | GPSPacket.WarnBeep = HoTT_Waring(); |
333 | GPSPacket.WarnBeep = HoTT_Waring(); |
- | 334 | if(GPSInfo.Flags & FLAG_DIFFSOLN) GPSPacket.SatFix = 'D'; |
|
- | 335 | else |
|
- | 336 | if(GPSInfo.SatFix == SATFIX_3D) GPSPacket.SatFix = ' '; |
|
- | 337 | else GPSPacket.SatFix = '!'; |
|
253 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
338 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
- | 339 | GPSPacket.FreeCharacters[0] = NC_GPS_ModeCharacter; |
|
- | 340 | GPSPacket.FreeCharacters[2] = GPSPacket.SatFix; |
|
- | 341 | GPSPacket.HomeDirection = GPSInfo.HomeBearing / 2;//230; |
|
254 | return(sizeof(GPSPacket)); |
342 | return(sizeof(GPSPacket)); |
255 | break; |
343 | break; |
256 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
344 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
257 | GetHottestBl(); |
345 | GetHottestBl(); |
258 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
346 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
259 | ElectricAirPacket.Battery1 = UBat; |
347 | ElectricAirPacket.Battery1 = UBat; |
260 | ElectricAirPacket.Battery2 = UBat; |
348 | ElectricAirPacket.Battery2 = UBat; |
261 | ElectricAirPacket.VoltageCell1 = ErsatzKompassInGrad / 2; |
349 | ElectricAirPacket.VoltageCell1 = ErsatzKompassInGrad / 2; |
262 | ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1; |
350 | ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1; |
263 | ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2; |
351 | ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2; |
264 | ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20; |
352 | ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20; |
265 | ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6; |
353 | ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6; |
266 | ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7; |
354 | ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7; |
267 | ElectricAirPacket.m_sec = BuildHoTT_Vario(); |
355 | ElectricAirPacket.m_sec = BuildHoTT_Vario(); |
268 | ElectricAirPacket.m_3sec = 120; |
356 | ElectricAirPacket.m_3sec = 120; |
269 | ElectricAirPacket.InputVoltage = UBat; |
357 | ElectricAirPacket.InputVoltage = UBat; |
270 | ElectricAirPacket.Temperature1 = MinBlTempertaure + 20; |
358 | ElectricAirPacket.Temperature1 = MinBlTempertaure + 20; |
271 | ElectricAirPacket.Temperature2 = MaxBlTempertaure + 20; |
359 | ElectricAirPacket.Temperature2 = MaxBlTempertaure + 20; |
272 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
360 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
273 | ElectricAirPacket.WarnBeep = HoTT_Waring(); |
361 | ElectricAirPacket.WarnBeep = 0;//HoTT_Waring(); |
274 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
362 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
275 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
363 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
- | 364 | ElectricAirPacket.FlightTimeMinutes = FlugSekunden / 60; |
|
- | 365 | ElectricAirPacket.FlightTimeSeconds = FlugSekunden % 60; |
|
276 | return(sizeof(ElectricAirPacket)); |
366 | return(sizeof(ElectricAirPacket)); |
277 | break; |
367 | break; |
278 | case HOTT_GENERAL_PACKET_ID: |
368 | case HOTT_GENERAL_PACKET_ID: |
279 | GetHottestBl(); |
369 | GetHottestBl(); |
280 | HoTTGeneral.Rpm = GPSInfo.HomeDistance/100; |
370 | HoTTGeneral.Rpm = GPSInfo.HomeDistance/100; |
281 | HoTTGeneral.VoltageCell1 = ErsatzKompassInGrad / 2; |
371 | HoTTGeneral.VoltageCell1 = ErsatzKompassInGrad / 2; |
282 | HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2; |
372 | HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2; |
283 | if(UBat > BattLowVoltageWarning + 5) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 6)) * 3; |
373 | if(UBat > BattLowVoltageWarning + 5) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 6)) * 3; |
284 | else HoTTGeneral.FuelPercent = 0; |
374 | else HoTTGeneral.FuelPercent = 0; |
285 | HoTTGeneral.FuelCapacity = HoehenWert/100; |
375 | HoTTGeneral.FuelCapacity = HoehenWert/100; |
286 | if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0; |
376 | if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0; |
287 | HoTTGeneral.Altitude = HoehenWert/100 + 500; |
377 | HoTTGeneral.Altitude = HoehenWert/100 + 500; |
288 | HoTTGeneral.Battery1 = UBat; |
378 | HoTTGeneral.Battery1 = UBat; |
289 | HoTTGeneral.Battery2 = UBat; |
379 | HoTTGeneral.Battery2 = UBat; |
290 | HoTTGeneral.m_sec = BuildHoTT_Vario(); |
380 | HoTTGeneral.m_sec = BuildHoTT_Vario(); |
291 | HoTTGeneral.m_3sec = 120; |
381 | HoTTGeneral.m_3sec = 120; |
292 | HoTTGeneral.InputVoltage = UBat; |
382 | HoTTGeneral.InputVoltage = UBat; |
293 | HoTTGeneral.Temperature1 = MinBlTempertaure + 20; |
383 | HoTTGeneral.Temperature1 = MinBlTempertaure + 20; |
294 | HoTTGeneral.Temperature2 = MaxBlTempertaure + 20; |
384 | HoTTGeneral.Temperature2 = MaxBlTempertaure + 20; |
295 | HoTTGeneral.Capacity = Capacity.UsedCapacity/10; |
385 | HoTTGeneral.Capacity = Capacity.UsedCapacity/10; |
296 | HoTTGeneral.WarnBeep = HoTT_Waring(); |
386 | HoTTGeneral.WarnBeep = 0;//HoTT_Waring(); |
297 | HoTTGeneral.Current = Capacity.ActualCurrent; |
387 | HoTTGeneral.Current = Capacity.ActualCurrent; |
298 | HoTT_DataPointer = (unsigned char *) &HoTTGeneral; |
388 | HoTT_DataPointer = (unsigned char *) &HoTTGeneral; |
299 | return(sizeof(HoTTGeneral)); |
389 | return(sizeof(HoTTGeneral)); |
300 | break; |
390 | break; |
301 | default: return(0); |
391 | default: return(0); |
302 | } |
392 | } |
303 | } |
393 | } |
304 | 394 | ||
305 | //--------------------------------------------------------------- |
395 | //--------------------------------------------------------------- |
306 | void HoTT_Menu(void) |
396 | void HoTT_Menu(void) |
307 | { |
397 | { |
308 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0; |
398 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0; |
309 | unsigned char tmp; |
399 | unsigned char tmp; |
310 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
400 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
311 | 401 | ||
312 | if(page == 0) |
402 | if(page == 0) |
313 | switch(line++) |
403 | switch(line++) |
314 | { |
404 | { |
315 | case 0: |
405 | case 0: |
316 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
406 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
317 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
407 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
318 | else |
408 | else |
319 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
409 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
320 | 410 | ||
321 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
411 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
322 | { |
412 | { |
323 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
413 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
324 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
414 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
325 | } |
415 | } |
326 | else HoTT_printfxy(10,0,"ALT:---- "); |
416 | else HoTT_printfxy(10,0,"ALT:---- "); |
327 | break; |
417 | break; |
328 | case 1: |
418 | case 1: |
329 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
419 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
330 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
420 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
331 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
421 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
332 | HoTT_printfxy(10,1,"DIR: %3d%c",ErsatzKompassInGrad, HoTT_GRAD); |
422 | HoTT_printfxy(10,1,"DIR: %3d%c",ErsatzKompassInGrad, HoTT_GRAD); |
333 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(20,1,"C") else HoTT_printfxy(20,1," "); |
423 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(20,1,"C") else HoTT_printfxy(20,1," "); |
334 | break; |
424 | break; |
335 | case 2: |
425 | case 2: |
336 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
426 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
337 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
427 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
338 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
428 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
339 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
429 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
340 | break; |
430 | break; |
341 | case 3: |
431 | case 3: |
342 | HoTT_printfxy(9,0,":"); |
432 | HoTT_printfxy(9,0,":"); |
343 | HoTT_printfxy(9,1,":"); |
433 | HoTT_printfxy(9,1,":"); |
344 | HoTT_printfxy(9,2,":"); |
434 | HoTT_printfxy(9,2,":"); |
345 | HoTT_printfxy(0,3,"---------+-----------"); |
435 | HoTT_printfxy(0,3,"---------+-----------"); |
346 | 436 | ||
347 | // HoTT_printfxy(0,3,"---------------------"); |
437 | // HoTT_printfxy(0,3,"---------------------"); |
348 | HoTT_printfxy(0,6,"---------------------"); |
438 | HoTT_printfxy(0,6,"---------------------"); |
349 | break; |
439 | break; |
350 | case 4: |
440 | case 4: |
351 | if(NaviDataOkay) |
441 | if(NaviDataOkay) |
352 | { |
442 | { |
353 | HoTT_printfxy(9,4,":"); |
443 | HoTT_printfxy(9,4,":"); |
354 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
444 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
355 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
445 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
356 | switch (GPSInfo.SatFix) |
446 | switch (GPSInfo.SatFix) |
357 | { |
447 | { |
358 | case SATFIX_3D: |
448 | case SATFIX_3D: |
359 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
449 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
360 | else HoTT_printfxy(7,4,"3D"); |
450 | else HoTT_printfxy(7,4,"3D"); |
361 | break; |
451 | break; |
362 | default: |
452 | default: |
363 | HoTT_printfxy_BLINK(7,4,"!!"); |
453 | HoTT_printfxy_BLINK(7,4,"!!"); |
364 | break; |
454 | break; |
365 | } |
455 | } |
366 | } |
456 | } |
367 | else |
457 | else |
368 | { |
458 | { |
369 | Hott_ClearLine(4); |
459 | Hott_ClearLine(4); |
370 | } |
460 | } |
371 | break; |
461 | break; |
372 | case 5: |
462 | case 5: |
373 | if(NaviDataOkay) |
463 | if(NaviDataOkay) |
374 | { |
464 | { |
375 | if(show_mag) |
465 | if(show_mag) |
376 | { |
466 | { |
377 | HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField); |
467 | HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField); |
378 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
468 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
379 | HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic); |
469 | HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic); |
380 | } |
470 | } |
381 | else |
471 | else |
382 | { |
472 | { |
383 | //HoTT_printfxy(9,5,":"); |
- | |
384 | HoTT_printfxy(0,5," %2um/s: HM:%3d%c %c",GPSInfo.Speed, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
473 | HoTT_printfxy(0,5," %2um/s: HM:%3d%c %c",GPSInfo.Speed, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
385 | // HoTT_printfxy(11,5,""); |
- | |
386 | } |
474 | } |
387 | } |
475 | } |
388 | else Hott_ClearLine(5); |
476 | else Hott_ClearLine(5); |
389 | break; |
477 | break; |
390 | case 6: |
478 | case 6: |
391 | break; |
479 | break; |
392 | case 7: if(NC_ErrorCode) |
480 | case 7: if(NC_ErrorCode) |
393 | { |
481 | { |
394 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
482 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
395 | { |
483 | { |
396 | Hott_ClearLine(7); |
484 | Hott_ClearLine(7); |
397 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
485 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
398 | } |
486 | } |
399 | else |
487 | else |
400 | { |
488 | { |
401 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
489 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
402 | } |
490 | } |
403 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
491 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
404 | break; |
492 | break; |
405 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
493 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
406 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
494 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
407 | case 9: |
495 | case 9: |
408 | case 10: |
496 | case 10: |
409 | case 11: |
497 | case 11: |
410 | case 12: |
498 | case 12: |
411 | case 13: |
499 | case 13: |
412 | case 14: |
500 | case 14: |
413 | case 15: |
501 | case 15: |
414 | case 16: |
502 | case 16: |
415 | if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;} |
503 | if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;} |
416 | else |
504 | else |
417 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
505 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
418 | HottKeyboard = 0; |
506 | HottKeyboard = 0; |
419 | break; |
507 | break; |
420 | default: line = 0; |
508 | default: line = 0; |
421 | break; |
509 | break; |
422 | } |
510 | } |
423 | else |
511 | else |
424 | if(page == 1) |
512 | if(page == 1) |
425 | switch(line++) |
513 | switch(line++) |
426 | { |
514 | { |
427 | case 0: |
515 | case 0: |
428 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
516 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
429 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
517 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
430 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
518 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
431 | break; |
519 | break; |
432 | case 1: |
520 | case 1: |
433 | HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD); |
521 | HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD); |
434 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
522 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
435 | { |
523 | { |
436 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
524 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
437 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
525 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
438 | } |
526 | } |
439 | else HoTT_printfxy(10,1,"ALT:---- "); |
527 | else HoTT_printfxy(10,1,"ALT:---- "); |
440 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
528 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
441 | break; |
529 | break; |
442 | case 2: |
530 | case 2: |
443 | if(NaviDataOkay) |
531 | if(NaviDataOkay) |
444 | { |
532 | { |
445 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
533 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
446 | } |
534 | } |
447 | else |
535 | else |
448 | { |
536 | { |
449 | Hott_ClearLine(2); |
537 | Hott_ClearLine(2); |
450 | } |
538 | } |
451 | break; |
539 | break; |
452 | case 3: |
540 | case 3: |
453 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
541 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
454 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3," "); |
542 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3," "); |
455 | break; |
543 | break; |
456 | case 4: |
544 | case 4: |
457 | if(NaviDataOkay) |
545 | if(NaviDataOkay) |
458 | { |
546 | { |
459 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
547 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
460 | switch (GPSInfo.SatFix) |
548 | switch (GPSInfo.SatFix) |
461 | { |
549 | { |
462 | case SATFIX_3D: |
550 | case SATFIX_3D: |
463 | HoTT_printfxy(16,4," 3D "); |
551 | HoTT_printfxy(16,4," 3D "); |
464 | break; |
552 | break; |
465 | //case SATFIX_2D: |
553 | //case SATFIX_2D: |
466 | //case SATFIX_NONE: |
554 | //case SATFIX_NONE: |
467 | default: |
555 | default: |
468 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
556 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
469 | break; |
557 | break; |
470 | } |
558 | } |
471 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
559 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
472 | { |
560 | { |
473 | HoTT_printfxy(16,4,"DGPS "); |
561 | HoTT_printfxy(16,4,"DGPS "); |
474 | } |
562 | } |
475 | } |
563 | } |
476 | else |
564 | else |
477 | { //012345678901234567890 |
565 | { //012345678901234567890 |
478 | HoTT_printfxy(0,4," No NaviCtrl "); |
566 | HoTT_printfxy(0,4," No NaviCtrl "); |
479 | } |
567 | } |
480 | break; |
568 | break; |
481 | case 5: |
569 | case 5: |
482 | if(show_current) |
570 | if(show_current) |
483 | { |
571 | { |
484 | HoTT_printfxy(0,5,"%2i.%i %2i.%i %2i.%i %2i.%iA", Motor[0].Current/10,Motor[0].Current%10,Motor[1].Current/10,Motor[1].Current%10,Motor[2].Current/10,Motor[2].Current%10,Motor[3].Current/10,Motor[3].Current%10); |
572 | HoTT_printfxy(0,5,"%2i.%i %2i.%i %2i.%i %2i.%iA", Motor[0].Current/10,Motor[0].Current%10,Motor[1].Current/10,Motor[1].Current%10,Motor[2].Current/10,Motor[2].Current%10,Motor[3].Current/10,Motor[3].Current%10); |
485 | } |
573 | } |
486 | else |
574 | else |
487 | { |
575 | { |
488 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
576 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
489 | } |
577 | } |
490 | break; |
578 | break; |
491 | case 6: |
579 | case 6: |
492 | if(show_current) |
580 | if(show_current) |
493 | { |
581 | { |
494 | if(RequiredMotors == 4) Hott_ClearLine(6); |
582 | if(RequiredMotors == 4) Hott_ClearLine(6); |
495 | else |
583 | else |
496 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%2i.%i %2i.%iA", Motor[4].Current/10,Motor[4].Current%10,Motor[5].Current/10,Motor[5].Current%10) |
584 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%2i.%i %2i.%iA", Motor[4].Current/10,Motor[4].Current%10,Motor[5].Current/10,Motor[5].Current%10) |
497 | else |
585 | else |
498 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%2i.%i %2i.%i %2i.%i %2i.%iA", Motor[4].Current/10,Motor[4].Current%10,Motor[5].Current/10,Motor[5].Current%10,Motor[6].Current/10,Motor[6].Current%10,Motor[7].Current/10,Motor[7].Current%10); |
586 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%2i.%i %2i.%i %2i.%i %2i.%iA", Motor[4].Current/10,Motor[4].Current%10,Motor[5].Current/10,Motor[5].Current%10,Motor[6].Current/10,Motor[6].Current%10,Motor[7].Current/10,Motor[7].Current%10); |
499 | } |
587 | } |
500 | else |
588 | else |
501 | { |
589 | { |
502 | if(RequiredMotors == 4) Hott_ClearLine(6); |
590 | if(RequiredMotors == 4) Hott_ClearLine(6); |
503 | else |
591 | else |
504 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
592 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
505 | else |
593 | else |
506 | 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); |
594 | 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); |
507 | } |
595 | } |
508 | break; |
596 | break; |
509 | case 7: if(NC_ErrorCode) |
597 | case 7: if(NC_ErrorCode) |
510 | { |
598 | { |
511 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
599 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
512 | { |
600 | { |
513 | Hott_ClearLine(7); |
601 | Hott_ClearLine(7); |
514 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
602 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
515 | } |
603 | } |
516 | else |
604 | else |
517 | { |
605 | { |
518 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
606 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
519 | } |
607 | } |
520 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
608 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
521 | break; |
609 | break; |
522 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
610 | case 8: // ASCIIPacket.WarnBeep = HoTT_Waring(); |
523 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
611 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
524 | case 9: |
612 | case 9: |
525 | case 10: |
613 | case 10: |
526 | case 11: |
614 | case 11: |
527 | case 12: |
615 | case 12: |
528 | case 13: |
616 | case 13: |
529 | case 14: |
617 | case 14: |
530 | case 15: |
618 | case 15: |
531 | case 16: |
619 | case 16: |
532 | if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1; Hott_ClearLine(5); Hott_ClearLine(6);} |
620 | if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1; Hott_ClearLine(5); Hott_ClearLine(6);} |
533 | else |
621 | else |
534 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;} |
622 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;} |
535 | else |
623 | else |
536 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;} |
624 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;} |
537 | //if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard); |
625 | //if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard); |
538 | HottKeyboard = 0; |
626 | HottKeyboard = 0; |
539 | break; |
627 | break; |
540 | default: line = 0; |
628 | default: line = 0; |
541 | break; |
629 | break; |
542 | } |
630 | } |
543 | else |
631 | else |
544 | if(page == 2) |
632 | if(page == 2) |
545 | switch(line++) |
633 | switch(line++) |
546 | { |
634 | { |
547 | case 0: |
635 | case 0: |
548 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name); |
636 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name); |
549 | break; |
637 | break; |
550 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
638 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
551 | break; |
639 | break; |
552 | case 2: HoTT_printfxy(0,2,"ALT:"); |
640 | case 2: HoTT_printfxy(0,2,"ALT:"); |
553 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
641 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
554 | { |
642 | { |
555 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
643 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
556 | else |
644 | else |
557 | { |
645 | { |
558 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
646 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
559 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
647 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
560 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
648 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
561 | } |
649 | } |
562 | } |
650 | } |
563 | else |
651 | else |
564 | HoTT_printf("DISABLED"); |
652 | HoTT_printf("DISABLED"); |
565 | break; |
653 | break; |
566 | case 3: HoTT_printfxy(0,3,"CF:"); |
654 | case 3: HoTT_printfxy(0,3,"CF:"); |
567 | if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED") |
655 | if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED") |
568 | else |
656 | else |
569 | { |
657 | { |
570 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
658 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
571 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
659 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
572 | } |
660 | } |
573 | break; |
661 | break; |
574 | case 4: HoTT_printfxy(0,4,"GPS:"); |
662 | case 4: HoTT_printfxy(0,4,"GPS:"); |
575 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
663 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
576 | else |
664 | else |
577 | { |
665 | { |
578 | CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl); |
666 | CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl); |
579 | if(tmp < 50) HoTT_printf("(FREE)") |
667 | if(tmp < 50) HoTT_printf("(FREE)") |
580 | else |
668 | else |
581 | if(tmp >= 180) HoTT_printf("(HOME)") |
669 | if(tmp >= 180) HoTT_printf("(HOME)") |
582 | else |
670 | else |
583 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
671 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
584 | else HoTT_printf("(HOLD)") |
672 | else HoTT_printf("(HOLD)") |
585 | } |
673 | } |
586 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
674 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
587 | 675 | ||
588 | break; |
676 | break; |
589 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
677 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
590 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
678 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
591 | break; |
679 | break; |
592 | case 6: |
680 | case 6: |
593 | if(!show_poti) |
681 | if(!show_poti) |
594 | { |
682 | { |
595 | 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); |
683 | 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); |
596 | HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
684 | HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
597 | } |
685 | } |
598 | else |
686 | else |
599 | { |
687 | { |
600 | HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3); |
688 | HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3); |
601 | HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6); |
689 | HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6); |
602 | } |
690 | } |
603 | 691 | ||
604 | break; |
692 | break; |
605 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
693 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
606 | if(HoTTBlink) |
694 | if(HoTTBlink) |
607 | { |
695 | { |
608 | LIBFC_HoTT_SetPos(6 * 21); |
696 | LIBFC_HoTT_SetPos(6 * 21); |
609 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
697 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
610 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
698 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
611 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
699 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
612 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
700 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
613 | } |
701 | } |
614 | break; |
702 | break; |
615 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
703 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
616 | break; |
704 | break; |
617 | case 9: |
705 | case 9: |
618 | case 10: |
706 | case 10: |
619 | case 11: |
707 | case 11: |
620 | case 12: |
708 | case 12: |
621 | case 13: |
709 | case 13: |
622 | case 14: |
710 | case 14: |
623 | case 15: |
711 | case 15: |
624 | case 16: |
712 | case 16: |
625 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
713 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
626 | else |
714 | else |
627 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
715 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
628 | HottKeyboard = 0; |
716 | HottKeyboard = 0; |
629 | break; |
717 | break; |
630 | default: line = 0; |
718 | default: line = 0; |
631 | break; |
719 | break; |
632 | } |
720 | } |
633 | else page = 0; |
721 | else page = 0; |
634 | } |
722 | } |
635 | 723 | ||
636 | #endif |
724 | #endif |
637 | 725 | ||
638 | 726 | ||
639 | 727 | ||
640 | 728 |