Rev 2437 | Rev 2439 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2437 | Rev 2438 | ||
---|---|---|---|
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 | unsigned char NaviData_WaypointIndex = 0; |
59 | unsigned char NaviData_WaypointIndex = 0; |
60 | unsigned char NaviData_WaypointNumber = 0, NaviData_TargetHoldTime = 0, ToNC_Load_WP_List = 0, NaviData_MaxWpListIndex = 0; |
60 | unsigned char NaviData_WaypointNumber = 0, NaviData_TargetHoldTime = 0, ToNC_Load_WP_List = 0, NaviData_MaxWpListIndex = 0; |
- | 61 | unsigned char ToNC_Load_SingePoint = 0, ToNC_Store_SingePoint = 0; |
|
61 | char WPL_Name[10];// = {" \0"}; |
62 | char WPL_Name[10];// = {" \0"}; |
62 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
63 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
63 | 64 | ||
64 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
65 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
65 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
66 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
66 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
67 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
67 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
68 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
68 | #define HoTT_printf_BLINK(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
69 | #define HoTT_printf_BLINK(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
69 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
70 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
70 | 71 | ||
71 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
72 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
72 | #define VOICE_BEEP 5 |
73 | #define VOICE_BEEP 5 |
73 | #define HoTT_GRAD 96 |
74 | #define HoTT_GRAD 96 |
74 | #define HoTT_LINKS 123 |
75 | #define HoTT_LINKS 123 |
75 | #define HoTT_RECHTS 124 |
76 | #define HoTT_RECHTS 124 |
76 | #define HoTT_OBEN 125 |
77 | #define HoTT_OBEN 125 |
77 | #define HoTT_UNTEN 126 |
78 | #define HoTT_UNTEN 126 |
78 | 79 | ||
79 | #define HOTT_KEY_RIGHT 1 |
80 | #define HOTT_KEY_RIGHT 1 |
80 | #define HOTT_KEY_DOWN 2 |
81 | #define HOTT_KEY_DOWN 2 |
81 | #define HOTT_KEY_UP 4 |
82 | #define HOTT_KEY_UP 4 |
82 | #define HOTT_KEY_SET 6 |
83 | #define HOTT_KEY_SET 6 |
83 | #define HOTT_KEY_LEFT 8 |
84 | #define HOTT_KEY_LEFT 8 |
84 | 85 | ||
85 | #define VARIO_ZERO 30000 |
86 | #define VARIO_ZERO 30000 |
86 | unsigned int NaviData_TargetDistance = 0; |
87 | unsigned int NaviData_TargetDistance = 0; |
87 | 88 | ||
88 | unsigned char MaxBlTemperture = 0; |
89 | unsigned char MaxBlTemperture = 0; |
89 | unsigned char MinBlTemperture = 0; |
90 | unsigned char MinBlTemperture = 0; |
90 | unsigned char HottestBl = 0; |
91 | unsigned char HottestBl = 0; |
91 | 92 | ||
92 | GPSPacket_t GPSPacket; |
93 | GPSPacket_t GPSPacket; |
93 | VarioPacket_t VarioPacket; |
94 | VarioPacket_t VarioPacket; |
94 | ASCIIPacket_t ASCIIPacket; |
95 | ASCIIPacket_t ASCIIPacket; |
95 | ElectricAirPacket_t ElectricAirPacket; |
96 | ElectricAirPacket_t ElectricAirPacket; |
96 | HoTTGeneral_t HoTTGeneral; |
97 | HoTTGeneral_t HoTTGeneral; |
97 | unsigned char SpeakHoTT = SPEAK_MIKROKOPTER; |
98 | unsigned char SpeakHoTT = SPEAK_MIKROKOPTER; |
98 | unsigned char ToNC_SpeakHoTT = 0, ShowSettingNameTime = 0; |
99 | unsigned char ToNC_SpeakHoTT = 0, ShowSettingNameTime = 0; |
99 | int HoTTVarioMeter = 0; |
100 | int HoTTVarioMeter = 0; |
100 | const char PROGMEM MIKROKOPTER[] = {" MikroKopter "}; |
101 | const char PROGMEM MIKROKOPTER[] = {" MikroKopter "}; |
101 | const char PROGMEM UNDERVOLTAGE[] = {" !! LiPo voltage !! "}; |
102 | const char PROGMEM UNDERVOLTAGE[] = {" !! LiPo voltage !! "}; |
102 | const char PROGMEM LANDING[] = {" !! LANDING !! "}; |
103 | const char PROGMEM LANDING[] = {" !! LANDING !! "}; |
103 | const char PROGMEM SETTING[] = {"Set :"}; |
104 | const char PROGMEM SETTING[] = {"Set :"}; |
104 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
105 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
105 | { |
106 | { |
106 | //0123456789123456 |
107 | //0123456789123456 |
107 | "No Error \0", // 0 |
108 | "No Error \0", // 0 |
108 | "Not compatible \0", // 1 |
109 | "Not compatible \0", // 1 |
109 | "MK3Mag not compa\0", // 2 |
110 | "MK3Mag not compa\0", // 2 |
110 | "No FC communicat\0", // 3 |
111 | "No FC communicat\0", // 3 |
111 | "Compass communic\0", // 4 |
112 | "Compass communic\0", // 4 |
112 | "GPS communicatio\0", // 5 |
113 | "GPS communicatio\0", // 5 |
113 | "compass value \0", // 6 |
114 | "compass value \0", // 6 |
114 | "RC Signal lost \0", // 7 |
115 | "RC Signal lost \0", // 7 |
115 | "FC spi rx error \0", // 8 |
116 | "FC spi rx error \0", // 8 |
116 | "No NC communicat\0", // 9 |
117 | "No NC communicat\0", // 9 |
117 | "FC Nick Gyro \0", // 10 |
118 | "FC Nick Gyro \0", // 10 |
118 | "FC Roll Gyro \0", // 11 |
119 | "FC Roll Gyro \0", // 11 |
119 | "FC Yaw Gyro \0", // 12 |
120 | "FC Yaw Gyro \0", // 12 |
120 | "FC Nick ACC \0", // 13 |
121 | "FC Nick ACC \0", // 13 |
121 | "FC Roll ACC \0", // 14 |
122 | "FC Roll ACC \0", // 14 |
122 | "FC Z-ACC \0", // 15 |
123 | "FC Z-ACC \0", // 15 |
123 | "Pressure sensor \0", // 16 |
124 | "Pressure sensor \0", // 16 |
124 | "I2C FC->BL-Ctrl \0", // 17 |
125 | "I2C FC->BL-Ctrl \0", // 17 |
125 | "Bl Missing \0", // 18 |
126 | "Bl Missing \0", // 18 |
126 | "Mixer Error \0", // 19 |
127 | "Mixer Error \0", // 19 |
127 | "Carefree Error \0", // 20 |
128 | "Carefree Error \0", // 20 |
128 | "GPS Fix lost \0", // 21 |
129 | "GPS Fix lost \0", // 21 |
129 | "Magnet Error \0", // 22 |
130 | "Magnet Error \0", // 22 |
130 | "Motor restart \0", // 23 |
131 | "Motor restart \0", // 23 |
131 | "BL Limitation \0", // 24 |
132 | "BL Limitation \0", // 24 |
132 | "GPS Range \0", // 25 |
133 | "GPS Range \0", // 25 |
133 | "No SD-Card \0", // 26 |
134 | "No SD-Card \0", // 26 |
134 | "SD-Logging error\0", // 27 |
135 | "SD-Logging error\0", // 27 |
135 | "Flying range! \0", // 28 |
136 | "Flying range! \0", // 28 |
136 | "Max Altitude! \0", // 29 |
137 | "Max Altitude! \0", // 29 |
137 | "No GPS fix \0", // 30 |
138 | "No GPS fix \0", // 30 |
138 | "compass not cal.\0", // 31 |
139 | "compass not cal.\0", // 31 |
139 | "BL-Selftest \0", // 32 |
140 | "BL-Selftest \0", // 32 |
140 | "no ext. compass \0", // 33 |
141 | "no ext. compass \0", // 33 |
141 | "compass sensor \0" // 34 |
142 | "compass sensor \0" // 34 |
142 | }; |
143 | }; |
143 | 144 | ||
144 | 145 | ||
145 | const char PROGMEM HOTT_ERROR[MAX_ERR_NUMBER][2] = |
146 | const char PROGMEM HOTT_ERROR[MAX_ERR_NUMBER][2] = |
146 | { // 1 -> only in flight 0 -> also on ground |
147 | { // 1 -> only in flight 0 -> also on ground |
147 | //0123456789123456 |
148 | //0123456789123456 |
148 | {0,0},// "No Error \0", // 0 |
149 | {0,0},// "No Error \0", // 0 |
149 | {SPEAK_ERROR,0}, // "Not compatible \0", // 1 |
150 | {SPEAK_ERROR,0}, // "Not compatible \0", // 1 |
150 | {SPEAK_ERROR,0}, // "MK3Mag not compa\0", // 2 |
151 | {SPEAK_ERROR,0}, // "MK3Mag not compa\0", // 2 |
151 | {SPEAK_ERR_NAVI,1}, // "No FC communicat\0", // 3 |
152 | {SPEAK_ERR_NAVI,1}, // "No FC communicat\0", // 3 |
152 | {SPEAK_ERR_COMPASS,1}, // "MK3Mag communica\0", // 4 |
153 | {SPEAK_ERR_COMPASS,1}, // "MK3Mag communica\0", // 4 |
153 | {SPEAK_ERR_GPS,0}, // "GPS communicatio\0", // 5 |
154 | {SPEAK_ERR_GPS,0}, // "GPS communicatio\0", // 5 |
154 | {SPEAK_ERR_COMPASS,1}, // "compass value \0", // 6 |
155 | {SPEAK_ERR_COMPASS,1}, // "compass value \0", // 6 |
155 | {SPEAK_ERR_RECEICER,0},// "RC Signal lost \0", // 7 |
156 | {SPEAK_ERR_RECEICER,0},// "RC Signal lost \0", // 7 |
156 | {SPEAK_ERR_NAVI,0}, // "FC spi rx error \0", // 8 |
157 | {SPEAK_ERR_NAVI,0}, // "FC spi rx error \0", // 8 |
157 | {SPEAK_ERR_NAVI,0}, // "No NC communicat\0", // 9 |
158 | {SPEAK_ERR_NAVI,0}, // "No NC communicat\0", // 9 |
158 | {SPEAK_ERR_SENSOR,0}, // "FC Nick Gyro \0", // 10 |
159 | {SPEAK_ERR_SENSOR,0}, // "FC Nick Gyro \0", // 10 |
159 | {SPEAK_ERR_SENSOR,0}, // "FC Roll Gyro \0", // 11 |
160 | {SPEAK_ERR_SENSOR,0}, // "FC Roll Gyro \0", // 11 |
160 | {SPEAK_ERR_SENSOR,0}, // "FC Yaw Gyro \0", // 12 |
161 | {SPEAK_ERR_SENSOR,0}, // "FC Yaw Gyro \0", // 12 |
161 | {SPEAK_ERR_SENSOR,0}, // "FC Nick ACC \0", // 13 |
162 | {SPEAK_ERR_SENSOR,0}, // "FC Nick ACC \0", // 13 |
162 | {SPEAK_ERR_SENSOR,0}, // "FC Roll ACC \0", // 14 |
163 | {SPEAK_ERR_SENSOR,0}, // "FC Roll ACC \0", // 14 |
163 | {SPEAK_ERR_SENSOR,0}, // "FC Z-ACC \0", // 15 |
164 | {SPEAK_ERR_SENSOR,0}, // "FC Z-ACC \0", // 15 |
164 | {SPEAK_ERR_SENSOR,0}, // "Pressure sensor \0", // 16 |
165 | {SPEAK_ERR_SENSOR,0}, // "Pressure sensor \0", // 16 |
165 | {SPEAK_ERR_DATABUS,1}, // "I2C FC->BL-Ctrl \0", // 17 |
166 | {SPEAK_ERR_DATABUS,1}, // "I2C FC->BL-Ctrl \0", // 17 |
166 | {SPEAK_ERR_DATABUS,1}, // "Bl Missing \0", // 18 |
167 | {SPEAK_ERR_DATABUS,1}, // "Bl Missing \0", // 18 |
167 | {SPEAK_ERROR,0}, // "Mixer Error \0", // 19 |
168 | {SPEAK_ERROR,0}, // "Mixer Error \0", // 19 |
168 | {SPEAK_CF_OFF,1}, // "Carefree Error \0", // 20 |
169 | {SPEAK_CF_OFF,1}, // "Carefree Error \0", // 20 |
169 | {SPEAK_GPS_FIX,1}, // "GPS Fix lost \0", // 21 |
170 | {SPEAK_GPS_FIX,1}, // "GPS Fix lost \0", // 21 |
170 | {SPEAK_ERR_COMPASS,0}, // "Magnet Error \0", // 22 |
171 | {SPEAK_ERR_COMPASS,0}, // "Magnet Error \0", // 22 |
171 | {SPEAK_ERR_MOTOR,1}, // "Motor restart \0", // 23 |
172 | {SPEAK_ERR_MOTOR,1}, // "Motor restart \0", // 23 |
172 | {SPEAK_MAX_TEMPERAT,1},// "BL Limitation \0", // 24 |
173 | {SPEAK_MAX_TEMPERAT,1},// "BL Limitation \0", // 24 |
173 | {SPEAK_MAX_RANGE,1}, // "GPS Range \0", // 25 |
174 | {SPEAK_MAX_RANGE,1}, // "GPS Range \0", // 25 |
174 | {SPEAK_ERROR,1}, // "No SD-Card \0", // 26 |
175 | {SPEAK_ERROR,1}, // "No SD-Card \0", // 26 |
175 | {SPEAK_ERROR,1}, // "SD-Logging error\0", // 27 |
176 | {SPEAK_ERROR,1}, // "SD-Logging error\0", // 27 |
176 | {SPEAK_MAX_RANGE,1}, // "Flying range! \0", // 28 |
177 | {SPEAK_MAX_RANGE,1}, // "Flying range! \0", // 28 |
177 | {SPEAK_MAX_ALTITUD,1}, // "Max Altitude! \0" // 29 |
178 | {SPEAK_MAX_ALTITUD,1}, // "Max Altitude! \0" // 29 |
178 | {SPEAK_GPS_FIX,1}, // "No GPS fix \0" // 30 |
179 | {SPEAK_GPS_FIX,1}, // "No GPS fix \0" // 30 |
179 | {SPEAK_ERR_CALIBARTION,0},// "compass not cal." // 31 |
180 | {SPEAK_ERR_CALIBARTION,0},// "compass not cal." // 31 |
180 | {SPEAK_ERR_MOTOR,0}, // "BL-Selftest \0" // 32 |
181 | {SPEAK_ERR_MOTOR,0}, // "BL-Selftest \0" // 32 |
181 | {SPEAK_ERR_COMPASS,0}, // "no ext. compass" // 33 |
182 | {SPEAK_ERR_COMPASS,0}, // "no ext. compass" // 33 |
182 | {SPEAK_ERR_COMPASS,0} // "compass sensor" // 34 |
183 | {SPEAK_ERR_COMPASS,0} // "compass sensor" // 34 |
183 | }; |
184 | }; |
184 | 185 | ||
185 | 186 | ||
186 | void GetHottestBl(void) |
187 | void GetHottestBl(void) |
187 | { |
188 | { |
188 | static unsigned char search = 0,tmp_max,tmp_min,who; |
189 | static unsigned char search = 0,tmp_max,tmp_min,who; |
189 | if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;} |
190 | if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;} |
190 | else |
191 | else |
191 | if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature; |
192 | if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature; |
192 | if(++search >= MAX_MOTORS) |
193 | if(++search >= MAX_MOTORS) |
193 | { |
194 | { |
194 | search = 0; |
195 | search = 0; |
195 | if(tmp_min != 255) MinBlTemperture = tmp_min; else MinBlTemperture = 0; |
196 | if(tmp_min != 255) MinBlTemperture = tmp_min; else MinBlTemperture = 0; |
196 | MaxBlTemperture = tmp_max; |
197 | MaxBlTemperture = tmp_max; |
197 | HottestBl = who; |
198 | HottestBl = who; |
198 | tmp_min = 255; |
199 | tmp_min = 255; |
199 | tmp_max = 0; |
200 | tmp_max = 0; |
200 | who = 0; |
201 | who = 0; |
201 | } |
202 | } |
202 | } |
203 | } |
203 | 204 | ||
204 | //--------------------------------------------------------------- |
205 | //--------------------------------------------------------------- |
205 | void Hott_ClearLine(unsigned char line) |
206 | void Hott_ClearLine(unsigned char line) |
206 | { |
207 | { |
207 | HoTT_printfxy(0,line," "); |
208 | HoTT_printfxy(0,line," "); |
208 | } |
209 | } |
209 | //--------------------------------------------------------------- |
210 | //--------------------------------------------------------------- |
210 | 211 | ||
211 | 212 | ||
212 | unsigned char HoTT_Waring(void) |
213 | unsigned char HoTT_Waring(void) |
213 | { |
214 | { |
214 | unsigned char status = 0; |
215 | unsigned char status = 0; |
215 | static char old_status = 0; |
216 | static char old_status = 0; |
216 | static int repeat; |
217 | static int repeat; |
217 | //if(Parameter_UserParam1) return(Parameter_UserParam1); |
218 | //if(Parameter_UserParam1) return(Parameter_UserParam1); |
218 | ToNC_SpeakHoTT = SpeakHoTT; |
219 | ToNC_SpeakHoTT = SpeakHoTT; |
219 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
220 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
220 | { |
221 | { |
221 | if(LowVoltageLandingActive && (EE_Parameter.Receiver == RECEIVER_HOTT)) status = SPEAK_LANDING; |
222 | if(LowVoltageLandingActive && (EE_Parameter.Receiver == RECEIVER_HOTT)) status = SPEAK_LANDING; |
222 | else status = VOICE_MINIMALE_EINGANSSPANNUNG; // Jeti hat kein wort: "LANDEN" |
223 | else status = VOICE_MINIMALE_EINGANSSPANNUNG; // Jeti hat kein wort: "LANDEN" |
223 | if(SpeakHoTT && old_status == VOICE_MINIMALE_EINGANSSPANNUNG) status = SpeakHoTT; // das soll auch noch durch kommen |
224 | if(SpeakHoTT && old_status == VOICE_MINIMALE_EINGANSSPANNUNG) status = SpeakHoTT; // das soll auch noch durch kommen |
224 | } |
225 | } |
225 | else |
226 | else |
226 | if(NC_ErrorCode && NC_ErrorCode < MAX_ERR_NUMBER) // Fehlercodes |
227 | if(NC_ErrorCode && NC_ErrorCode < MAX_ERR_NUMBER) // Fehlercodes |
227 | { |
228 | { |
228 | if(MotorenEin || !pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][1])) status = pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][0]); |
229 | if(MotorenEin || !pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][1])) status = pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][0]); |
229 | } |
230 | } |
230 | if(!status) // Sprachansagen |
231 | if(!status) // Sprachansagen |
231 | { |
232 | { |
232 | // if(!(GetParamByte(PID_SPEAK_HOTT_CFG) & 0x01)) SpeakHoTT = 0; // is the voice wanted? |
233 | // if(!(GetParamByte(PID_SPEAK_HOTT_CFG) & 0x01)) SpeakHoTT = 0; // is the voice wanted? |
233 | if(!(EE_Parameter.GlobalConfig3 & CFG3_SPEAK_ALL)) SpeakHoTT = 0; // is the voice wanted? |
234 | if(!(EE_Parameter.GlobalConfig3 & CFG3_SPEAK_ALL)) SpeakHoTT = 0; // is the voice wanted? |
234 | else status = SpeakHoTT; |
235 | else status = SpeakHoTT; |
235 | } |
236 | } |
236 | else ToNC_SpeakHoTT = status; |
237 | else ToNC_SpeakHoTT = status; |
237 | 238 | ||
238 | if(old_status == status) // Gleichen Fehler nur alle 4 sek bringen |
239 | if(old_status == status) // Gleichen Fehler nur alle 4 sek bringen |
239 | { |
240 | { |
240 | if(!CheckDelay(repeat)) return(0); |
241 | if(!CheckDelay(repeat)) return(0); |
241 | repeat = SetDelay(4000); |
242 | repeat = SetDelay(4000); |
242 | } |
243 | } |
243 | else repeat = SetDelay(2000); |
244 | else repeat = SetDelay(2000); |
244 | 245 | ||
245 | if(status) |
246 | if(status) |
246 | { |
247 | { |
247 | if(status == SpeakHoTT) SpeakHoTT = 0; |
248 | if(status == SpeakHoTT) SpeakHoTT = 0; |
248 | } |
249 | } |
249 | old_status = status; |
250 | old_status = status; |
250 | // DebugOut.Analog[16] = status; |
251 | // DebugOut.Analog[16] = status; |
251 | return(status); |
252 | return(status); |
252 | } |
253 | } |
253 | 254 | ||
254 | /* |
255 | /* |
255 | unsigned char HoTTErrorCode(void) |
256 | unsigned char HoTTErrorCode(void) |
256 | { |
257 | { |
257 | return(NC_ErrorCode); |
258 | return(NC_ErrorCode); |
258 | } |
259 | } |
259 | */ |
260 | */ |
260 | //--------------------------------------------------------------- |
261 | //--------------------------------------------------------------- |
261 | void NC_Fills_HoTT_Telemety(void) |
262 | void NC_Fills_HoTT_Telemety(void) |
262 | { |
263 | { |
263 | unsigned char *ptr = NULL; |
264 | unsigned char *ptr = NULL; |
264 | unsigned char max = 0,i,z; |
265 | unsigned char max = 0,i,z; |
265 | switch(FromNaviCtrl.Param.Byte[11]) |
266 | switch(FromNaviCtrl.Param.Byte[11]) |
266 | { |
267 | { |
267 | case HOTT_VARIO_PACKET_ID: |
268 | case HOTT_VARIO_PACKET_ID: |
268 | ptr = (unsigned char *) &VarioPacket; |
269 | ptr = (unsigned char *) &VarioPacket; |
269 | max = sizeof(VarioPacket); |
270 | max = sizeof(VarioPacket); |
270 | break; |
271 | break; |
271 | case HOTT_GPS_PACKET_ID: |
272 | case HOTT_GPS_PACKET_ID: |
272 | ptr = (unsigned char *) &GPSPacket; |
273 | ptr = (unsigned char *) &GPSPacket; |
273 | max = sizeof(GPSPacket); |
274 | max = sizeof(GPSPacket); |
274 | break; |
275 | break; |
275 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
276 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
276 | ptr = (unsigned char *) &ElectricAirPacket; |
277 | ptr = (unsigned char *) &ElectricAirPacket; |
277 | max = sizeof(ElectricAirPacket); |
278 | max = sizeof(ElectricAirPacket); |
278 | break; |
279 | break; |
279 | case HOTT_GENERAL_PACKET_ID: |
280 | case HOTT_GENERAL_PACKET_ID: |
280 | ptr = (unsigned char *) &HoTTGeneral; |
281 | ptr = (unsigned char *) &HoTTGeneral; |
281 | max = sizeof(HoTTGeneral); |
282 | max = sizeof(HoTTGeneral); |
282 | break; |
283 | break; |
283 | case JETI_GPS_PACKET_ID1: |
284 | case JETI_GPS_PACKET_ID1: |
284 | ptr = (unsigned char *) &JetiExData[14].Value; |
285 | ptr = (unsigned char *) &JetiExData[14].Value; |
285 | max = sizeof(JetiExData[14].Value); |
286 | max = sizeof(JetiExData[14].Value); |
286 | break; |
287 | break; |
287 | case JETI_GPS_PACKET_ID2: |
288 | case JETI_GPS_PACKET_ID2: |
288 | ptr = (unsigned char *) &JetiExData[15].Value; |
289 | ptr = (unsigned char *) &JetiExData[15].Value; |
289 | max = sizeof(JetiExData[15].Value); |
290 | max = sizeof(JetiExData[15].Value); |
290 | break; |
291 | break; |
291 | case HOTT_WPL_NAME: |
292 | case HOTT_WPL_NAME: |
292 | ptr = (unsigned char *) WPL_Name; |
293 | ptr = (unsigned char *) WPL_Name; |
293 | max = sizeof(WPL_Name)-1; |
294 | max = sizeof(WPL_Name)-1; |
294 | break; |
295 | break; |
295 | 296 | ||
296 | } |
297 | } |
297 | z = FromNaviCtrl.Param.Byte[0]; // Data allocation |
298 | z = FromNaviCtrl.Param.Byte[0]; // Data allocation |
298 | 299 | ||
299 | for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++) |
300 | for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++) |
300 | { |
301 | { |
301 | if(z >= max) break; |
302 | if(z >= max) break; |
302 | ptr[z] = FromNaviCtrl.Param.Byte[2+i]; |
303 | ptr[z] = FromNaviCtrl.Param.Byte[2+i]; |
303 | z++; |
304 | z++; |
304 | } |
305 | } |
305 | } |
306 | } |
306 | 307 | ||
307 | unsigned int BuildHoTT_Vario(void) |
308 | unsigned int BuildHoTT_Vario(void) |
308 | { |
309 | { |
309 | unsigned int tmp = VARIO_ZERO; |
310 | unsigned int tmp = VARIO_ZERO; |
310 | if(VarioCharacter == '+' || VarioCharacter == '-') |
311 | if(VarioCharacter == '+' || VarioCharacter == '-') |
311 | { |
312 | { |
312 | tmp = VARIO_ZERO + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3; |
313 | tmp = VARIO_ZERO + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3; |
313 | if(tmp < VARIO_ZERO && tmp > VARIO_ZERO - 50) tmp = VARIO_ZERO - 50; // weil es sonst erst bei < 0,5m/sek piept |
314 | if(tmp < VARIO_ZERO && tmp > VARIO_ZERO - 50) tmp = VARIO_ZERO - 50; // weil es sonst erst bei < 0,5m/sek piept |
314 | } |
315 | } |
315 | else |
316 | else |
316 | if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY)) |
317 | if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY)) |
317 | { |
318 | { |
318 | tmp = VARIO_ZERO + HoTTVarioMeter; |
319 | tmp = VARIO_ZERO + HoTTVarioMeter; |
319 | if(tmp > VARIO_ZERO) |
320 | if(tmp > VARIO_ZERO) |
320 | { |
321 | { |
321 | if(tmp < VARIO_ZERO + 100) tmp = VARIO_ZERO; |
322 | if(tmp < VARIO_ZERO + 100) tmp = VARIO_ZERO; |
322 | else tmp -= 100; |
323 | else tmp -= 100; |
323 | } |
324 | } |
324 | if(tmp < VARIO_ZERO) |
325 | if(tmp < VARIO_ZERO) |
325 | { |
326 | { |
326 | if(tmp > VARIO_ZERO - 100) tmp = VARIO_ZERO; |
327 | if(tmp > VARIO_ZERO - 100) tmp = VARIO_ZERO; |
327 | else tmp += 100; |
328 | else tmp += 100; |
328 | } |
329 | } |
329 | } |
330 | } |
330 | else |
331 | else |
331 | if(VarioCharacter == '^') tmp = VARIO_ZERO + FromNC_AltitudeSpeed * 10; |
332 | if(VarioCharacter == '^') tmp = VARIO_ZERO + FromNC_AltitudeSpeed * 10; |
332 | else |
333 | else |
333 | if(VarioCharacter == 'v') tmp = VARIO_ZERO - FromNC_AltitudeSpeed * 10; |
334 | if(VarioCharacter == 'v') tmp = VARIO_ZERO - FromNC_AltitudeSpeed * 10; |
334 | return(tmp); |
335 | return(tmp); |
335 | } |
336 | } |
336 | 337 | ||
337 | //--------------------------------------------------------------- |
338 | //--------------------------------------------------------------- |
338 | unsigned char HoTT_Telemety(unsigned char packet_request) |
339 | unsigned char HoTT_Telemety(unsigned char packet_request) |
339 | { |
340 | { |
340 | unsigned char i; |
341 | unsigned char i; |
341 | //Debug("rqst: %02X",packet_request); |
342 | //Debug("rqst: %02X",packet_request); |
342 | 343 | ||
343 | switch(packet_request) |
344 | switch(packet_request) |
344 | { |
345 | { |
345 | case HOTT_VARIO_PACKET_ID: |
346 | case HOTT_VARIO_PACKET_ID: |
346 | GPSPacket.WarnBeep = HoTT_Waring(); // Achtung: das ist richtig hier, damit der Varioton schon vorher abgestellt wird |
347 | GPSPacket.WarnBeep = HoTT_Waring(); // Achtung: das ist richtig hier, damit der Varioton schon vorher abgestellt wird |
347 | VarioPacket.Altitude = HoehenWert/100 + 500; |
348 | VarioPacket.Altitude = HoehenWert/100 + 500; |
348 | if(!GPSPacket.WarnBeep) VarioPacket.m_sec = BuildHoTT_Vario(); else VarioPacket.m_sec = VARIO_ZERO; |
349 | if(!GPSPacket.WarnBeep) VarioPacket.m_sec = BuildHoTT_Vario(); else VarioPacket.m_sec = VARIO_ZERO; |
349 | VarioPacket.m_3sec = VarioPacket.m_sec; |
350 | VarioPacket.m_3sec = VarioPacket.m_sec; |
350 | VarioPacket.m_10sec = VarioPacket.m_sec; |
351 | VarioPacket.m_10sec = VarioPacket.m_sec; |
351 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
352 | if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude; |
352 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
353 | if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude; |
353 | VarioPacket.WarnBeep = 0;//HoTT_Waring(); |
354 | VarioPacket.WarnBeep = 0;//HoTT_Waring(); |
354 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
355 | HoTT_DataPointer = (unsigned char *) &VarioPacket; |
355 | VarioPacket.FreeCharacters[0] = VarioCharacter; |
356 | VarioPacket.FreeCharacters[0] = VarioCharacter; |
356 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) VarioPacket.FreeCharacters[1] = 'C'; else VarioPacket.FreeCharacters[1] = ' '; |
357 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) VarioPacket.FreeCharacters[1] = 'C'; else VarioPacket.FreeCharacters[1] = ' '; |
357 | // VarioPacket.FreeCharacters[2] = ' '; |
358 | // VarioPacket.FreeCharacters[2] = ' '; |
358 | if(NC_ErrorCode) |
359 | if(NC_ErrorCode) |
359 | { |
360 | { |
360 | VarioPacket.Text[0] = NC_ErrorCode/10 + '0'; |
361 | VarioPacket.Text[0] = NC_ErrorCode/10 + '0'; |
361 | VarioPacket.Text[1] = NC_ErrorCode%10 + '0'; |
362 | VarioPacket.Text[1] = NC_ErrorCode%10 + '0'; |
362 | VarioPacket.Text[2] = ':'; |
363 | VarioPacket.Text[2] = ':'; |
363 | for(i=0; i<16;i++) VarioPacket.Text[i+3] = pgm_read_byte(&NC_ERROR_TEXT[NC_ErrorCode][i]); |
364 | for(i=0; i<16;i++) VarioPacket.Text[i+3] = pgm_read_byte(&NC_ERROR_TEXT[NC_ErrorCode][i]); |
364 | VarioPacket.Text[19] = ' '; |
365 | VarioPacket.Text[19] = ' '; |
365 | VarioPacket.Text[20] = ' '; |
366 | VarioPacket.Text[20] = ' '; |
366 | } |
367 | } |
367 | else |
368 | else |
368 | if(LowVoltageLandingActive) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&LANDING[i]); // no Error |
369 | if(LowVoltageLandingActive) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&LANDING[i]); // no Error |
369 | else |
370 | else |
370 | if(FC_StatusFlags & FC_STATUS_LOWBAT) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&UNDERVOLTAGE[i]); // no Error |
371 | if(FC_StatusFlags & FC_STATUS_LOWBAT) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&UNDERVOLTAGE[i]); // no Error |
371 | else |
372 | else |
372 | if(ShowSettingNameTime) // no Error |
373 | if(ShowSettingNameTime) // no Error |
373 | { |
374 | { |
374 | for(i=0; i<sizeof(SETTING);i++) VarioPacket.Text[i] = pgm_read_byte(&SETTING[i]); |
375 | for(i=0; i<sizeof(SETTING);i++) VarioPacket.Text[i] = pgm_read_byte(&SETTING[i]); |
375 | VarioPacket.Text[4] = '0' + ActiveParamSet; |
376 | VarioPacket.Text[4] = '0' + ActiveParamSet; |
376 | for(i=0; i<sizeof(EE_Parameter.Name);i++) VarioPacket.Text[i+7] = EE_Parameter.Name[i]; // no Error |
377 | for(i=0; i<sizeof(EE_Parameter.Name);i++) VarioPacket.Text[i+7] = EE_Parameter.Name[i]; // no Error |
377 | VarioPacket.Text[18] = ' '; |
378 | VarioPacket.Text[18] = ' '; |
378 | VarioPacket.Text[19] = ' '; |
379 | VarioPacket.Text[19] = ' '; |
379 | VarioPacket.Text[20] = ' '; |
380 | VarioPacket.Text[20] = ' '; |
380 | } |
381 | } |
381 | else |
382 | else |
382 | if(NaviData_WaypointNumber) |
383 | if(NaviData_WaypointNumber) |
383 | { |
384 | { |
384 | unsigned int tmp_int; |
385 | unsigned int tmp_int; |
385 | unsigned char tmp; |
386 | unsigned char tmp; |
386 | VarioPacket.Text[0] = 'W'; VarioPacket.Text[1] = 'P'; |
387 | VarioPacket.Text[0] = 'W'; VarioPacket.Text[1] = 'P'; |
387 | VarioPacket.Text[2] = ' '; |
388 | VarioPacket.Text[2] = ' '; |
388 | VarioPacket.Text[3] = '0'+(NaviData_WaypointIndex) / 10; |
389 | VarioPacket.Text[3] = '0'+(NaviData_WaypointIndex) / 10; |
389 | VarioPacket.Text[4] = '0'+(NaviData_WaypointIndex) % 10; |
390 | VarioPacket.Text[4] = '0'+(NaviData_WaypointIndex) % 10; |
390 | VarioPacket.Text[5] = '/'; |
391 | VarioPacket.Text[5] = '/'; |
391 | VarioPacket.Text[6] = '0'+(NaviData_WaypointNumber) / 10; |
392 | VarioPacket.Text[6] = '0'+(NaviData_WaypointNumber) / 10; |
392 | VarioPacket.Text[7] = '0'+(NaviData_WaypointNumber) % 10; |
393 | VarioPacket.Text[7] = '0'+(NaviData_WaypointNumber) % 10; |
393 | VarioPacket.Text[8] = ' '; |
394 | VarioPacket.Text[8] = ' '; |
394 | tmp_int = NaviData_TargetDistance; |
395 | tmp_int = NaviData_TargetDistance; |
395 | if(tmp_int > 1000) { VarioPacket.Text[9] = '0'+(tmp_int) / 1000; tmp_int %= 1000;} |
396 | if(tmp_int > 1000) { VarioPacket.Text[9] = '0'+(tmp_int) / 1000; tmp_int %= 1000;} |
396 | else VarioPacket.Text[9] = ' '; |
397 | else VarioPacket.Text[9] = ' '; |
397 | if(tmp_int > 100) { VarioPacket.Text[10] = '0'+(tmp_int) / 100; tmp_int %= 100;} |
398 | if(tmp_int > 100) { VarioPacket.Text[10] = '0'+(tmp_int) / 100; tmp_int %= 100;} |
398 | else VarioPacket.Text[10] = ' '; |
399 | else VarioPacket.Text[10] = ' '; |
399 | VarioPacket.Text[11] = '0'+(tmp_int) / 10; |
400 | VarioPacket.Text[11] = '0'+(tmp_int) / 10; |
400 | VarioPacket.Text[12] = '0'+(tmp_int) % 10; |
401 | VarioPacket.Text[12] = '0'+(tmp_int) % 10; |
401 | VarioPacket.Text[13] = 'm'; |
402 | VarioPacket.Text[13] = 'm'; |
402 | VarioPacket.Text[14] = ' '; |
403 | VarioPacket.Text[14] = ' '; |
403 | tmp = NaviData_TargetHoldTime; |
404 | tmp = NaviData_TargetHoldTime; |
404 | if(tmp > 100) { VarioPacket.Text[15] = '0'+(tmp) / 100; tmp %= 100;} else VarioPacket.Text[15] = ' '; |
405 | if(tmp > 100) { VarioPacket.Text[15] = '0'+(tmp) / 100; tmp %= 100;} else VarioPacket.Text[15] = ' '; |
405 | VarioPacket.Text[16] = '0'+(tmp) / 10; |
406 | VarioPacket.Text[16] = '0'+(tmp) / 10; |
406 | VarioPacket.Text[17] = '0'+(tmp) % 10; |
407 | VarioPacket.Text[17] = '0'+(tmp) % 10; |
407 | VarioPacket.Text[18] = 's'; |
408 | VarioPacket.Text[18] = 's'; |
408 | VarioPacket.Text[19] = ' '; |
409 | VarioPacket.Text[19] = ' '; |
409 | VarioPacket.Text[20] = ' '; |
410 | VarioPacket.Text[20] = ' '; |
410 | } |
411 | } |
411 | else |
412 | else |
412 | if(!CalibrationDone) |
413 | if(!CalibrationDone) |
413 | { |
414 | { |
414 | for(i=0; i<17;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i+2]); // no Error and not calibrated |
415 | for(i=0; i<17;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i+2]); // no Error and not calibrated |
415 | VarioPacket.Text[16] = '0'+VERSION_MAJOR; |
416 | VarioPacket.Text[16] = '0'+VERSION_MAJOR; |
416 | VarioPacket.Text[17] = '.'; |
417 | VarioPacket.Text[17] = '.'; |
417 | VarioPacket.Text[18] = '0'+VERSION_MINOR/10; |
418 | VarioPacket.Text[18] = '0'+VERSION_MINOR/10; |
418 | VarioPacket.Text[19] = '0'+VERSION_MINOR%10; |
419 | VarioPacket.Text[19] = '0'+VERSION_MINOR%10; |
419 | VarioPacket.Text[20] = 'a'+VERSION_PATCH; |
420 | VarioPacket.Text[20] = 'a'+VERSION_PATCH; |
420 | } |
421 | } |
421 | else |
422 | else |
422 | { |
423 | { |
423 | for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i]); // no Error |
424 | for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i]); // no Error |
424 | if(RedundanceBlOperation) VarioPacket.Text[0] = 'R'; |
425 | if(RedundanceBlOperation) VarioPacket.Text[0] = 'R'; |
425 | } |
426 | } |
426 | return(sizeof(VarioPacket)); |
427 | return(sizeof(VarioPacket)); |
427 | break; |
428 | break; |
428 | 429 | ||
429 | case HOTT_GPS_PACKET_ID: |
430 | case HOTT_GPS_PACKET_ID: |
430 | GPSPacket.Altitude = HoehenWert/100 + 500; |
431 | GPSPacket.Altitude = HoehenWert/100 + 500; |
431 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; // macht die NC |
432 | // GPSPacket.Distance = GPSInfo.HomeDistance/10; // macht die NC |
432 | // GPSPacket.Heading = GPSInfo.HomeBearing/2; // macht die NC |
433 | // GPSPacket.Heading = GPSInfo.HomeBearing/2; // macht die NC |
433 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; // macht die NC |
434 | // GPSPacket.Speed = (GPSInfo.Speed * 36) / 10; // macht die NC |
434 | // GPSPacket.WarnBeep = HoTT_Waring(); //(wird jetzt weiter oben gemacht) |
435 | // GPSPacket.WarnBeep = HoTT_Waring(); //(wird jetzt weiter oben gemacht) |
435 | if(!GPSPacket.WarnBeep) GPSPacket.m_sec = BuildHoTT_Vario(); else GPSPacket.m_sec = VARIO_ZERO; |
436 | if(!GPSPacket.WarnBeep) GPSPacket.m_sec = BuildHoTT_Vario(); else GPSPacket.m_sec = VARIO_ZERO; |
436 | GPSPacket.m_3sec = 120; |
437 | GPSPacket.m_3sec = 120; |
437 | GPSPacket.NumOfSats = GPSInfo.NumOfSats; |
438 | GPSPacket.NumOfSats = GPSInfo.NumOfSats; |
438 | if(GPSInfo.Flags & FLAG_DIFFSOLN) GPSPacket.SatFix = 'D'; |
439 | if(GPSInfo.Flags & FLAG_DIFFSOLN) GPSPacket.SatFix = 'D'; |
439 | else |
440 | else |
440 | if(GPSInfo.SatFix == SATFIX_3D) GPSPacket.SatFix = ' '; |
441 | if(GPSInfo.SatFix == SATFIX_3D) GPSPacket.SatFix = ' '; |
441 | else GPSPacket.SatFix = '!'; |
442 | else GPSPacket.SatFix = '!'; |
442 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
443 | HoTT_DataPointer = (unsigned char *) &GPSPacket; |
443 | GPSPacket.FreeCharacters[0] = NC_GPS_ModeCharacter; |
444 | GPSPacket.FreeCharacters[0] = NC_GPS_ModeCharacter; |
444 | GPSPacket.FreeCharacters[2] = GPSPacket.SatFix; |
445 | GPSPacket.FreeCharacters[2] = GPSPacket.SatFix; |
445 | GPSPacket.HomeDirection = GPSInfo.HomeBearing / 2;//230; |
446 | GPSPacket.HomeDirection = GPSInfo.HomeBearing / 2;//230; |
446 | return(sizeof(GPSPacket)); |
447 | return(sizeof(GPSPacket)); |
447 | break; |
448 | break; |
448 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
449 | case HOTT_ELECTRIC_AIR_PACKET_ID: |
449 | GetHottestBl(); |
450 | GetHottestBl(); |
450 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
451 | ElectricAirPacket.Altitude = HoehenWert/100 + 500; |
451 | ElectricAirPacket.Battery1 = UBat; |
452 | ElectricAirPacket.Battery1 = UBat; |
452 | ElectricAirPacket.Battery2 = UBat; |
453 | ElectricAirPacket.Battery2 = UBat; |
453 | ElectricAirPacket.VoltageCell1 = CompassCorrected / 2; |
454 | ElectricAirPacket.VoltageCell1 = CompassCorrected / 2; |
454 | ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1; |
455 | ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1; |
455 | ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2; |
456 | ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2; |
456 | ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20; |
457 | ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20; |
457 | ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6; |
458 | ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6; |
458 | ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7; |
459 | ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7; |
459 | if(!GPSPacket.WarnBeep) ElectricAirPacket.m_sec = BuildHoTT_Vario(); else ElectricAirPacket.m_sec = VARIO_ZERO; |
460 | if(!GPSPacket.WarnBeep) ElectricAirPacket.m_sec = BuildHoTT_Vario(); else ElectricAirPacket.m_sec = VARIO_ZERO; |
460 | ElectricAirPacket.m_3sec = 120; |
461 | ElectricAirPacket.m_3sec = 120; |
461 | ElectricAirPacket.InputVoltage = UBat; |
462 | ElectricAirPacket.InputVoltage = UBat; |
462 | ElectricAirPacket.Temperature1 = MinBlTemperture + 20; |
463 | ElectricAirPacket.Temperature1 = MinBlTemperture + 20; |
463 | ElectricAirPacket.Temperature2 = MaxBlTemperture + 20; |
464 | ElectricAirPacket.Temperature2 = MaxBlTemperture + 20; |
464 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
465 | ElectricAirPacket.Capacity = Capacity.UsedCapacity/10; |
465 | // ElectricAirPacket.WarnBeep = 0;//HoTT_Waring(); |
466 | // ElectricAirPacket.WarnBeep = 0;//HoTT_Waring(); |
466 | ElectricAirPacket.WarnBeep = GPSPacket.WarnBeep; |
467 | ElectricAirPacket.WarnBeep = GPSPacket.WarnBeep; |
467 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
468 | ElectricAirPacket.Current = Capacity.ActualCurrent; |
468 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
469 | HoTT_DataPointer = (unsigned char *) &ElectricAirPacket; |
469 | ElectricAirPacket.FlightTimeMinutes = FlugSekunden / 60; |
470 | ElectricAirPacket.FlightTimeMinutes = FlugSekunden / 60; |
470 | ElectricAirPacket.FlightTimeSeconds = FlugSekunden % 60; |
471 | ElectricAirPacket.FlightTimeSeconds = FlugSekunden % 60; |
471 | return(sizeof(ElectricAirPacket)); |
472 | return(sizeof(ElectricAirPacket)); |
472 | break; |
473 | break; |
473 | case HOTT_GENERAL_PACKET_ID: |
474 | case HOTT_GENERAL_PACKET_ID: |
474 | GetHottestBl(); |
475 | GetHottestBl(); |
475 | HoTTGeneral.Rpm = GPSInfo.HomeDistance/100; |
476 | HoTTGeneral.Rpm = GPSInfo.HomeDistance/100; |
476 | HoTTGeneral.VoltageCell1 = CompassCorrected / 2; |
477 | HoTTGeneral.VoltageCell1 = CompassCorrected / 2; |
477 | HoTTGeneral.VoltageCell2 = KompassValue / 2; |
478 | HoTTGeneral.VoltageCell2 = KompassValue / 2; |
478 | //HoTTGeneral.VoltageCell3 = Magnetstaerke -> macht NC |
479 | //HoTTGeneral.VoltageCell3 = Magnetstaerke -> macht NC |
479 | //HoTTGeneral.VoltageCell4 = Inclinition -> macht NC |
480 | //HoTTGeneral.VoltageCell4 = Inclinition -> macht NC |
480 | HoTTGeneral.VoltageCell5 = DebugOut.Analog[28]; // I2C ErrorCounter |
481 | HoTTGeneral.VoltageCell5 = DebugOut.Analog[28]; // I2C ErrorCounter |
481 | HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2; |
482 | HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2; |
482 | if(UBat > BattLowVoltageWarning + 2) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 2)) * 3; |
483 | if(UBat > BattLowVoltageWarning + 2) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 2)) * 3; |
483 | else HoTTGeneral.FuelPercent = 0; |
484 | else HoTTGeneral.FuelPercent = 0; |
484 | if(HoTTGeneral.FuelPercent > 100) HoTTGeneral.FuelPercent = 100; |
485 | if(HoTTGeneral.FuelPercent > 100) HoTTGeneral.FuelPercent = 100; |
485 | HoTTGeneral.FuelCapacity = NC_ErrorCode;//HoehenWert/100; // Oelpegel |
486 | HoTTGeneral.FuelCapacity = NC_ErrorCode;//HoehenWert/100; // Oelpegel |
486 | // if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0; |
487 | // if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0; |
487 | HoTTGeneral.Altitude = HoehenWert/100 + 500; |
488 | HoTTGeneral.Altitude = HoehenWert/100 + 500; |
488 | HoTTGeneral.Battery1 = UBat; |
489 | HoTTGeneral.Battery1 = UBat; |
489 | HoTTGeneral.Battery2 = UBat; |
490 | HoTTGeneral.Battery2 = UBat; |
490 | if(!GPSPacket.WarnBeep) HoTTGeneral.m_sec = BuildHoTT_Vario(); else HoTTGeneral.m_sec = VARIO_ZERO; |
491 | if(!GPSPacket.WarnBeep) HoTTGeneral.m_sec = BuildHoTT_Vario(); else HoTTGeneral.m_sec = VARIO_ZERO; |
491 | HoTTGeneral.m_3sec = 120 + GPSPacket.WarnBeep; |
492 | HoTTGeneral.m_3sec = 120 + GPSPacket.WarnBeep; |
492 | HoTTGeneral.InputVoltage = UBat; |
493 | HoTTGeneral.InputVoltage = UBat; |
493 | HoTTGeneral.Temperature1 = MinBlTemperture + 20; |
494 | HoTTGeneral.Temperature1 = MinBlTemperture + 20; |
494 | HoTTGeneral.Temperature2 = MaxBlTemperture + 20; |
495 | HoTTGeneral.Temperature2 = MaxBlTemperture + 20; |
495 | HoTTGeneral.Capacity = Capacity.UsedCapacity/10; |
496 | HoTTGeneral.Capacity = Capacity.UsedCapacity/10; |
496 | HoTTGeneral.WarnBeep = 0;//HoTT_Waring(); |
497 | HoTTGeneral.WarnBeep = 0;//HoTT_Waring(); |
497 | HoTTGeneral.Current = Capacity.ActualCurrent; |
498 | HoTTGeneral.Current = Capacity.ActualCurrent; |
498 | //HoTTGeneral.ErrorNumber = HoTTErrorCode(); |
499 | //HoTTGeneral.ErrorNumber = HoTTErrorCode(); |
499 | HoTT_DataPointer = (unsigned char *) &HoTTGeneral; |
500 | HoTT_DataPointer = (unsigned char *) &HoTTGeneral; |
500 | return(sizeof(HoTTGeneral)); |
501 | return(sizeof(HoTTGeneral)); |
501 | break; |
502 | break; |
502 | default: return(0); |
503 | default: return(0); |
503 | } |
504 | } |
504 | } |
505 | } |
505 | 506 | ||
506 | //--------------------------------------------------------------- |
507 | //--------------------------------------------------------------- |
507 | void HoTT_Menu(void) |
508 | void HoTT_Menu(void) |
508 | { |
509 | { |
509 | static unsigned char load_waypoint_tmp2 = 1, changed, load_waypoint_tmp = 1, changed2; |
- | |
510 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0; |
510 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0; |
511 | unsigned char tmp; |
511 | unsigned char tmp; |
512 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
512 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
513 | 513 | ||
514 | // if(HottKeyboard) {beeptime = 1000;}; |
514 | // if(HottKeyboard) {beeptime = 1000;}; |
515 | 515 | ||
516 | switch(page) |
516 | switch(page) |
517 | { |
517 | { |
518 | case 0: |
518 | case 0: |
519 | switch(line++) |
519 | switch(line++) |
520 | { |
520 | { |
521 | case 0: |
521 | case 0: |
522 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
522 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
523 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
523 | HoTT_printfxy_BLINK(0,0," %2i.%1iV ",UBat/10, UBat%10) |
524 | else |
524 | else |
525 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
525 | HoTT_printfxy(0,0," %2i.%1iV ",UBat/10, UBat%10) |
526 | 526 | ||
527 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
527 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
528 | { |
528 | { |
529 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
529 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
530 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
530 | else HoTT_printfxy(10,0,"ALT:%4im ", (int16_t)(HoehenWert/100)) |
531 | } |
531 | } |
532 | else HoTT_printfxy(10,0,"ALT:---- "); |
532 | else HoTT_printfxy(10,0,"ALT:---- "); |
533 | break; |
533 | break; |
534 | case 1: |
534 | case 1: |
535 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
535 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
536 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
536 | HoTT_printfxy_BLINK(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60) |
537 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
537 | else HoTT_printfxy(0,1," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
538 | HoTT_printfxy(10,1,"DIR: %3d%c",CompassCorrected, HoTT_GRAD); |
538 | HoTT_printfxy(10,1,"DIR: %3d%c",CompassCorrected, HoTT_GRAD); |
539 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(20,1,"C") else HoTT_printfxy(20,1," "); |
539 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(20,1,"C") else HoTT_printfxy(20,1," "); |
540 | break; |
540 | break; |
541 | case 2: |
541 | case 2: |
542 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
542 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
543 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
543 | HoTT_printfxy_BLINK(0,2," %5i ",Capacity.UsedCapacity) |
544 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
544 | else HoTT_printfxy(0,2," %5i ",Capacity.UsedCapacity); |
545 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
545 | HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
546 | break; |
546 | break; |
547 | case 3: |
547 | case 3: |
548 | HoTT_printfxy(9,0,":"); |
548 | HoTT_printfxy(9,0,":"); |
549 | HoTT_printfxy(9,1,":"); |
549 | HoTT_printfxy(9,1,":"); |
550 | HoTT_printfxy(9,2,":"); |
550 | HoTT_printfxy(9,2,":"); |
551 | HoTT_printfxy(0,3,"---------+-----------"); |
551 | HoTT_printfxy(0,3,"---------+-----------"); |
552 | 552 | ||
553 | // HoTT_printfxy(0,3,"---------------------"); |
553 | // HoTT_printfxy(0,3,"---------------------"); |
554 | HoTT_printfxy(0,6,"---------------------"); |
554 | HoTT_printfxy(0,6,"---------------------"); |
555 | break; |
555 | break; |
556 | case 4: |
556 | case 4: |
557 | if(NaviDataOkay) |
557 | if(NaviDataOkay) |
558 | { |
558 | { |
559 | HoTT_printfxy(9,4,":"); |
559 | HoTT_printfxy(9,4,":"); |
560 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
560 | HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats); |
561 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
561 | HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10); |
562 | switch (GPSInfo.SatFix) |
562 | switch (GPSInfo.SatFix) |
563 | { |
563 | { |
564 | case SATFIX_3D: |
564 | case SATFIX_3D: |
565 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
565 | if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ") |
566 | else HoTT_printfxy(7,4,"3D"); |
566 | else HoTT_printfxy(7,4,"3D"); |
567 | break; |
567 | break; |
568 | default: |
568 | default: |
569 | HoTT_printfxy_BLINK(7,4,"!!"); |
569 | HoTT_printfxy_BLINK(7,4,"!!"); |
570 | break; |
570 | break; |
571 | } |
571 | } |
572 | } |
572 | } |
573 | else |
573 | else |
574 | { |
574 | { |
575 | Hott_ClearLine(4); |
575 | Hott_ClearLine(4); |
576 | } |
576 | } |
577 | break; |
577 | break; |
578 | case 5: |
578 | case 5: |
579 | if(NaviDataOkay) |
579 | if(NaviDataOkay) |
580 | { |
580 | { |
581 | if(show_mag) |
581 | if(show_mag) |
582 | { |
582 | { |
583 | HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField); |
583 | HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField); |
584 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
584 | HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
585 | HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic); |
585 | HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic); |
586 | } |
586 | } |
587 | else |
587 | else |
588 | { |
588 | { |
589 | HoTT_printfxy(0,5," %2um/s: HM:%3d%c %c",GPSInfo.Speed, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
589 | HoTT_printfxy(0,5," %2um/s: HM:%3d%c %c",GPSInfo.Speed, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
590 | } |
590 | } |
591 | } |
591 | } |
592 | else Hott_ClearLine(5); |
592 | else Hott_ClearLine(5); |
593 | break; |
593 | break; |
594 | case 6: |
594 | case 6: |
595 | break; |
595 | break; |
596 | case 7: if(NC_ErrorCode) |
596 | case 7: if(NC_ErrorCode) |
597 | { |
597 | { |
598 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
598 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
599 | { |
599 | { |
600 | Hott_ClearLine(7); |
600 | Hott_ClearLine(7); |
601 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
601 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
602 | } |
602 | } |
603 | else |
603 | else |
604 | { |
604 | { |
605 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
605 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
606 | } |
606 | } |
607 | else |
607 | else |
608 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy(1,7,"!! LiPo voltage !!") |
608 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy(1,7,"!! LiPo voltage !!") |
609 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
609 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
610 | break; |
610 | break; |
611 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
611 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
612 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
612 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
613 | case 9: |
613 | case 9: |
614 | case 10: |
614 | case 10: |
615 | case 11: |
615 | case 11: |
616 | case 12: |
616 | case 12: |
617 | case 13: |
617 | case 13: |
618 | case 14: |
618 | case 14: |
619 | case 15: |
619 | case 15: |
620 | case 16: |
620 | case 16: |
621 | if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;} |
621 | if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;} |
622 | else |
622 | else |
623 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
623 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
624 | HottKeyboard = 0; |
624 | HottKeyboard = 0; |
625 | break; |
625 | break; |
626 | default: line = 0; |
626 | default: line = 0; |
627 | break; |
627 | break; |
628 | } |
628 | } |
629 | break; |
629 | break; |
630 | case 1: |
630 | case 1: |
631 | switch(line++) |
631 | switch(line++) |
632 | { |
632 | { |
633 | case 0: |
633 | case 0: |
634 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
634 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
635 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
635 | HoTT_printfxy_BLINK(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity) |
636 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
636 | else HoTT_printfxy(0,0," %2i:%02i %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity); |
637 | break; |
637 | break; |
638 | case 1: |
638 | case 1: |
639 | HoTT_printfxy(0,1,"DIR:%3d%c",CompassCorrected, HoTT_GRAD); |
639 | HoTT_printfxy(0,1,"DIR:%3d%c",CompassCorrected, HoTT_GRAD); |
640 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
640 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
641 | { |
641 | { |
642 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
642 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
643 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
643 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
644 | } |
644 | } |
645 | else HoTT_printfxy(10,1,"ALT:---- "); |
645 | else HoTT_printfxy(10,1,"ALT:---- "); |
646 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
646 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
647 | break; |
647 | break; |
648 | case 2: |
648 | case 2: |
649 | if(NaviDataOkay) |
649 | if(NaviDataOkay) |
650 | { |
650 | { |
651 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
651 | HoTT_printfxy(1,2,"HM:%3d%c DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter); |
652 | } |
652 | } |
653 | else |
653 | else |
654 | { |
654 | { |
655 | Hott_ClearLine(2); |
655 | Hott_ClearLine(2); |
656 | } |
656 | } |
657 | break; |
657 | break; |
658 | case 3: |
658 | case 3: |
659 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
659 | HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
660 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3," "); |
660 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3," "); |
661 | break; |
661 | break; |
662 | case 4: |
662 | case 4: |
663 | if(NaviDataOkay) |
663 | if(NaviDataOkay) |
664 | { |
664 | { |
665 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
665 | HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats); |
666 | switch (GPSInfo.SatFix) |
666 | switch (GPSInfo.SatFix) |
667 | { |
667 | { |
668 | case SATFIX_3D: |
668 | case SATFIX_3D: |
669 | HoTT_printfxy(16,4," 3D "); |
669 | HoTT_printfxy(16,4," 3D "); |
670 | break; |
670 | break; |
671 | //case SATFIX_2D: |
671 | //case SATFIX_2D: |
672 | //case SATFIX_NONE: |
672 | //case SATFIX_NONE: |
673 | default: |
673 | default: |
674 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
674 | HoTT_printfxy_BLINK(16,4,"NOFIX"); |
675 | break; |
675 | break; |
676 | } |
676 | } |
677 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
677 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
678 | { |
678 | { |
679 | HoTT_printfxy(16,4,"DGPS "); |
679 | HoTT_printfxy(16,4,"DGPS "); |
680 | } |
680 | } |
681 | } |
681 | } |
682 | else |
682 | else |
683 | { //012345678901234567890 |
683 | { //012345678901234567890 |
684 | HoTT_printfxy(0,4," No NaviCtrl "); |
684 | HoTT_printfxy(0,4," No NaviCtrl "); |
685 | } |
685 | } |
686 | break; |
686 | break; |
687 | case 5: |
687 | case 5: |
688 | if(show_current) |
688 | if(show_current) |
689 | { |
689 | { |
690 | // 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); |
690 | // 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); |
691 | HoTT_printfxy(0,5,"%2i.%i %2i.%i %2i.%i %2i.%iA", BL3_Current(0)/10,BL3_Current(0)%10,BL3_Current(1)/10,BL3_Current(1)%10,BL3_Current(2)/10,BL3_Current(2)%10,BL3_Current(3)/10,BL3_Current(3)%10); |
691 | HoTT_printfxy(0,5,"%2i.%i %2i.%i %2i.%i %2i.%iA", BL3_Current(0)/10,BL3_Current(0)%10,BL3_Current(1)/10,BL3_Current(1)%10,BL3_Current(2)/10,BL3_Current(2)%10,BL3_Current(3)/10,BL3_Current(3)%10); |
692 | } |
692 | } |
693 | else |
693 | else |
694 | { |
694 | { |
695 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
695 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
696 | } |
696 | } |
697 | break; |
697 | break; |
698 | case 6: |
698 | case 6: |
699 | if(show_current) |
699 | if(show_current) |
700 | { |
700 | { |
701 | if(RequiredMotors == 4) Hott_ClearLine(6); |
701 | if(RequiredMotors == 4) Hott_ClearLine(6); |
702 | else |
702 | else |
703 | // 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) |
703 | // 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) |
704 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%2i.%i %2i.%iA", BL3_Current(4)/10,BL3_Current(4)%10, BL3_Current(5)/10,BL3_Current(5)%10) |
704 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%2i.%i %2i.%iA", BL3_Current(4)/10,BL3_Current(4)%10, BL3_Current(5)/10,BL3_Current(5)%10) |
705 | else |
705 | else |
706 | // 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); |
706 | // 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); |
707 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%2i.%i %2i.%i %2i.%i %2i.%iA", BL3_Current(4)/10,BL3_Current(4)%10,BL3_Current(5)/10,BL3_Current(5)%10,BL3_Current(6)/10,BL3_Current(6)%10,BL3_Current(7)/10,BL3_Current(7)%10,BL3_Current(8)/10,BL3_Current(8)%10); |
707 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%2i.%i %2i.%i %2i.%i %2i.%iA", BL3_Current(4)/10,BL3_Current(4)%10,BL3_Current(5)/10,BL3_Current(5)%10,BL3_Current(6)/10,BL3_Current(6)%10,BL3_Current(7)/10,BL3_Current(7)%10,BL3_Current(8)/10,BL3_Current(8)%10); |
708 | } |
708 | } |
709 | else |
709 | else |
710 | { |
710 | { |
711 | if(RequiredMotors == 4) Hott_ClearLine(6); |
711 | if(RequiredMotors == 4) Hott_ClearLine(6); |
712 | else |
712 | else |
713 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
713 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
714 | else |
714 | else |
715 | 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); |
715 | 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); |
716 | } |
716 | } |
717 | break; |
717 | break; |
718 | case 7: if(NC_ErrorCode) |
718 | case 7: if(NC_ErrorCode) |
719 | { |
719 | { |
720 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
720 | if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER) |
721 | { |
721 | { |
722 | Hott_ClearLine(7); |
722 | Hott_ClearLine(7); |
723 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
723 | HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode); |
724 | } |
724 | } |
725 | else |
725 | else |
726 | { |
726 | { |
727 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
727 | HoTT_printfxy(0,7,"ERR: "); _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);}; |
728 | } |
728 | } |
729 | else |
729 | else |
730 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy(1,7,"!! LiPo voltage !!") |
730 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy(1,7,"!! LiPo voltage !!") |
731 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
731 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
732 | break; |
732 | break; |
733 | case 8: // ASCIIPacket.WarnBeep = HoTT_Waring(); |
733 | case 8: // ASCIIPacket.WarnBeep = HoTT_Waring(); |
734 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
734 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
735 | case 9: |
735 | case 9: |
736 | case 10: |
736 | case 10: |
737 | case 11: |
737 | case 11: |
738 | case 12: |
738 | case 12: |
739 | case 13: |
739 | case 13: |
740 | case 14: |
740 | case 14: |
741 | case 15: |
741 | case 15: |
742 | case 16: |
742 | case 16: |
743 | if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1; Hott_ClearLine(5); Hott_ClearLine(6);} |
743 | if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1; Hott_ClearLine(5); Hott_ClearLine(6);} |
744 | else |
744 | else |
745 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;} |
745 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;} |
746 | else |
746 | else |
747 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;} |
747 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;} |
748 | //if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard); |
748 | //if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard); |
749 | HottKeyboard = 0; |
749 | HottKeyboard = 0; |
750 | break; |
750 | break; |
751 | default: line = 0; |
751 | default: line = 0; |
752 | break; |
752 | break; |
753 | } |
753 | } |
754 | break; |
754 | break; |
755 | case 2: |
755 | case 2: |
756 | switch(line++) |
756 | switch(line++) |
757 | { |
757 | { |
758 | case 0: |
758 | case 0: |
759 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",ActiveParamSet,EE_Parameter.Name); |
759 | HoTT_printfxy_INV(0,0,"Setting:%u %s ",ActiveParamSet,EE_Parameter.Name); |
760 | break; |
760 | break; |
761 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
761 | case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
762 | break; |
762 | break; |
763 | case 2: HoTT_printfxy(0,2,"ALT:"); |
763 | case 2: HoTT_printfxy(0,2,"ALT:"); |
764 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
764 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
765 | { |
765 | { |
766 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
766 | if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter) |
767 | else |
767 | else |
768 | { |
768 | { |
769 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
769 | if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON) ") else HoTT_printf("(OFF) "); |
770 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
770 | if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter) |
771 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
771 | else HoTT_printf("VARIO", Parameter_HoehenSchalter); |
772 | } |
772 | } |
773 | } |
773 | } |
774 | else |
774 | else |
775 | HoTT_printf("DISABLED"); |
775 | HoTT_printf("DISABLED"); |
776 | break; |
776 | break; |
777 | case 3: HoTT_printfxy(0,3,"CF:"); |
777 | case 3: HoTT_printfxy(0,3,"CF:"); |
778 | if(!EE_Parameter.CareFreeChannel) HoTT_printf("DISABLED") |
778 | if(!EE_Parameter.CareFreeChannel) HoTT_printf("DISABLED") |
779 | else |
779 | else |
780 | { |
780 | { |
781 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
781 | if(CareFree) HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)"); |
782 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
782 | if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH"); |
783 | } |
783 | } |
784 | break; |
784 | break; |
785 | case 4: HoTT_printfxy(0,4,"GPS:"); |
785 | case 4: HoTT_printfxy(0,4,"GPS:"); |
786 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
786 | if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED") |
787 | else |
787 | else |
788 | { |
788 | { |
789 | tmp = GetChannelValue(EE_Parameter.NaviGpsModeChannel); |
789 | tmp = GetChannelValue(EE_Parameter.NaviGpsModeChannel); |
790 | if(tmp < 50) HoTT_printf("(FREE)") |
790 | if(tmp < 50) HoTT_printf("(FREE)") |
791 | else |
791 | else |
792 | if(tmp >= 180) HoTT_printf("(HOME)") |
792 | if(tmp >= 180) HoTT_printf("(HOME)") |
793 | else |
793 | else |
794 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
794 | if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ") |
795 | else HoTT_printf("(HOLD)") |
795 | else HoTT_printf("(HOLD)") |
796 | } |
796 | } |
797 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
797 | if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime) |
798 | 798 | ||
799 | break; |
799 | break; |
800 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
800 | case 5: HoTT_printfxy(0,5,"HOME ALT:"); |
801 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
801 | if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD "); |
802 | break; |
802 | break; |
803 | case 6: |
803 | case 6: |
804 | if(!show_poti) |
804 | if(!show_poti) |
805 | { |
805 | { |
806 | 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); |
806 | 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); |
807 | HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
807 | HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
808 | } |
808 | } |
809 | else |
809 | else |
810 | { |
810 | { |
811 | HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3); |
811 | HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3); |
812 | HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6); |
812 | HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6); |
813 | } |
813 | } |
814 | 814 | ||
815 | break; |
815 | break; |
816 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
816 | case 7: //HoTT_printfxy(0,6,"WARNINGS:"); |
817 | if(HoTTBlink) |
817 | if(HoTTBlink) |
818 | { |
818 | { |
819 | LIBFC_HoTT_SetPos(6 * 21); |
819 | LIBFC_HoTT_SetPos(6 * 21); |
820 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
820 | if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! "); |
821 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
821 | if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! "); |
822 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
822 | if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! "); |
823 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
823 | if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! "); |
824 | } |
824 | } |
825 | break; |
825 | break; |
826 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
826 | case 8: //ASCIIPacket.WarnBeep = HoTT_Waring(); |
827 | break; |
827 | break; |
828 | case 9: |
828 | case 9: |
829 | case 10: |
829 | case 10: |
830 | case 11: |
830 | case 11: |
831 | case 12: |
831 | case 12: |
832 | case 13: |
832 | case 13: |
833 | case 14: |
833 | case 14: |
834 | case 15: |
834 | case 15: |
835 | case 16: |
835 | case 16: |
836 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
836 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
837 | else |
837 | else |
838 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 3; line = 0;} |
838 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 3; line = 0;} |
839 | else |
839 | else |
840 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
840 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
841 | HottKeyboard = 0; |
841 | HottKeyboard = 0; |
842 | break; |
842 | break; |
843 | default: line = 0; |
843 | default: line = 0; |
844 | break; |
844 | break; |
845 | } |
845 | } |
846 | break; |
846 | break; |
847 | case 3: |
847 | case 3: |
848 | switch(line++) |
848 | switch(line++) |
849 | { |
849 | { |
- | 850 | static unsigned char load_waypoint_tmp2 = 1, changed2; |
|
850 | case 0: |
851 | case 0: |
851 | HoTT_printfxy(0,0,"Load Waypoints"); |
852 | HoTT_printfxy(0,0,"Load Waypoints"); |
852 | HoTT_printfxy(0,1,"(Relative Positions)"); |
853 | HoTT_printfxy(0,1,"(Relative Positions)"); |
853 | // HoTT_printfxy(0,1,"(Absolute)"); |
854 | // HoTT_printfxy(0,1,"(Absolute)"); |
854 | break; |
855 | break; |
855 | case 1: |
856 | case 1: |
856 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active WP:%2d/%d ",NaviData_WaypointIndex,NaviData_WaypointNumber) |
857 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active WP:%2d/%d ",NaviData_WaypointIndex,NaviData_WaypointNumber) |
857 | else HoTT_printfxy(0,6,"No WPs active ") |
858 | else HoTT_printfxy(0,6,"No WPs active ") |
858 | break; |
859 | break; |
859 | case 2: |
860 | case 2: |
860 | HoTT_printfxy(0,7,"%2i.%1iV ",UBat/10, UBat%10) |
861 | HoTT_printfxy(0,7,"%2i.%1iV ",UBat/10, UBat%10) |
861 | HoTT_printfxy(11,7,"%s",WPL_Name) |
862 | HoTT_printfxy(11,7,"%s",WPL_Name) |
862 | case 3: |
863 | case 3: |
863 | case 4: |
864 | case 4: |
864 | case 5: |
865 | case 5: |
865 | if(load_waypoint_tmp2) |
866 | if(load_waypoint_tmp2) |
866 | { |
867 | { |
867 | if(changed2 && HoTTBlink) HoTT_printfxy(10,3," ") |
868 | if(changed2 && HoTTBlink) HoTT_printfxy(10,3," ") |
868 | else HoTT_printfxy(10,3,"%2i ",load_waypoint_tmp2); |
869 | else HoTT_printfxy(10,3,"%2i ",load_waypoint_tmp2); |
869 | HoTT_printfxy(0,3,"Load list:") |
870 | HoTT_printfxy(0,3,"Load list:") |
870 | } |
871 | } |
871 | else |
872 | else |
872 | { |
873 | { |
873 | HoTT_printfxy(0,3,"Load list: -- "); |
874 | HoTT_printfxy(0,3,"Load list: -- "); |
874 | } |
875 | } |
875 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,4,"No SD-Card ") |
876 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,4,"No SD-Card ") |
876 | else |
877 | else |
877 | { |
878 | { |
878 | if(GPSInfo.SatFix == SATFIX_3D) |
879 | if(GPSInfo.SatFix == SATFIX_3D) |
879 | { |
880 | { |
880 | if(changed2 && load_waypoint_tmp2) HoTT_printfxy(0,4,"(Set -> Load)") |
881 | if(changed2 && load_waypoint_tmp2) HoTT_printfxy(0,4,"(Set -> Load)") |
881 | else HoTT_printfxy(0,4," "); |
882 | else HoTT_printfxy(0,4," "); |
882 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp2) ToNC_Load_WP_List = load_waypoint_tmp2 | 128; changed2 = 0;} |
883 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp2) ToNC_Load_WP_List = load_waypoint_tmp2 | 128; changed2 = 0;} |
883 | } else HoTT_printfxy(0,4,"!No GPS-Fix! "); |
884 | } else HoTT_printfxy(0,4,"!No GPS-Fix! "); |
884 | } |
885 | } |
885 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp2 < NaviData_MaxWpListIndex) { changed2 = 1; load_waypoint_tmp2++;HoTTBlink = 0;} |
886 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp2 < NaviData_MaxWpListIndex) { changed2 = 1; load_waypoint_tmp2++;HoTTBlink = 0;} |
886 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp2 > 1) { changed2 = 1; load_waypoint_tmp2--;HoTTBlink = 0;}; |
887 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp2 > 1) { changed2 = 1; load_waypoint_tmp2--;HoTTBlink = 0;}; |
887 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 4; line = 0;} |
888 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 4; line = 0;} |
888 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 2; line = 0;}; |
889 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 2; line = 0;}; |
889 | HottKeyboard = 0; |
890 | HottKeyboard = 0; |
890 | break; |
891 | break; |
891 | default: line = 0; |
892 | default: line = 0; |
892 | break; |
893 | break; |
893 | } |
894 | } |
894 | break; |
895 | break; |
895 | case 4: |
896 | case 4: |
896 | switch(line++) |
897 | switch(line++) |
897 | { |
898 | { |
- | 899 | static unsigned char load_waypoint_tmp = 1, changed; |
|
898 | case 0: |
900 | case 0: |
899 | HoTT_printfxy(0,0,"Load Waypoints"); |
901 | HoTT_printfxy(0,0,"Load Waypoints"); |
900 | HoTT_printfxy(0,1,"(Fixed Positions)"); |
902 | HoTT_printfxy(0,1,"(Fixed Positions)"); |
901 | break; |
903 | break; |
902 | case 1: |
904 | case 1: |
903 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active WP:%2d/%d ",NaviData_WaypointIndex,NaviData_WaypointNumber) |
905 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active WP:%2d/%d ",NaviData_WaypointIndex,NaviData_WaypointNumber) |
904 | else HoTT_printfxy(0,6,"No WPs active ") |
906 | else HoTT_printfxy(0,6,"No WPs active ") |
905 | break; |
907 | break; |
906 | case 2: |
908 | case 2: |
907 | HoTT_printfxy(0,7,"%2i.%1iV ",UBat/10, UBat%10) |
909 | HoTT_printfxy(0,7,"%2i.%1iV ",UBat/10, UBat%10) |
908 | HoTT_printfxy(11,7,"%s",WPL_Name) |
910 | HoTT_printfxy(11,7,"%s",WPL_Name) |
909 | case 3: |
911 | case 3: |
910 | case 4: |
912 | case 4: |
911 | case 5: |
913 | case 5: |
912 | if(HottKeyboard) DebugOut.Analog[17]++; |
914 | HoTT_printfxy(0,3,"Load list:") |
913 | if(load_waypoint_tmp) |
915 | if(load_waypoint_tmp) |
914 | { |
916 | { |
915 | if(changed && HoTTBlink) HoTT_printfxy(10,3," ") |
917 | if(changed && HoTTBlink) HoTT_printfxy(10,3," ") |
916 | else HoTT_printfxy(10,3,"%2d (FIX)",load_waypoint_tmp); |
918 | else HoTT_printfxy(10,3,"%2d (FIX)",load_waypoint_tmp); |
917 | HoTT_printfxy(0,3,"Load list:") |
- | |
918 | } |
919 | } |
919 | else |
920 | else |
920 | { |
921 | { |
921 | HoTT_printfxy(0,3,"Load list: -- "); |
922 | HoTT_printfxy(10,3," --") |
922 | } |
923 | } |
923 | 924 | ||
924 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,4,"No SD-Card ") |
925 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,4,"No SD-Card ") |
925 | else |
926 | else |
926 | { |
927 | { |
927 | if(changed && load_waypoint_tmp) HoTT_printfxy(0,4,"(Set -> Load)") |
928 | if(changed && load_waypoint_tmp) HoTT_printfxy(0,4,"(Set -> Load)") |
928 | else HoTT_printfxy(0,4," "); |
929 | else HoTT_printfxy(0,4," "); |
929 | } |
930 | } |
930 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp < NaviData_MaxWpListIndex) { changed = 1; load_waypoint_tmp++; HoTTBlink = 0;} |
931 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp < NaviData_MaxWpListIndex) { changed = 1; load_waypoint_tmp++; HoTTBlink = 0;} |
931 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp > 1) { changed = 1; load_waypoint_tmp--; HoTTBlink = 0;}; |
932 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp > 1) { changed = 1; load_waypoint_tmp--; HoTTBlink = 0;}; |
932 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp) ToNC_Load_WP_List = load_waypoint_tmp; changed = 0;} |
933 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp) ToNC_Load_WP_List = load_waypoint_tmp; changed = 0;} |
- | 934 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page++; line = 0;} |
|
- | 935 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page--; line = 0;}; |
|
- | 936 | HottKeyboard = 0; |
|
- | 937 | break; |
|
- | 938 | default: line = 0; |
|
- | 939 | break; |
|
- | 940 | } |
|
- | 941 | break; |
|
- | 942 | case 5: |
|
- | 943 | switch(line++) |
|
- | 944 | { |
|
- | 945 | static unsigned char wp_tmp, changed; |
|
- | 946 | case 0: |
|
- | 947 | HoTT_printfxy(0,0,"Store single Position"); |
|
- | 948 | // HoTT_printfxy(0,1,"(Fixed Positions)"); |
|
- | 949 | break; |
|
- | 950 | case 1: |
|
- | 951 | HoTT_printfxy(0,2," %2i.%1iV ",UBat/10, UBat%10) |
|
- | 952 | HoTT_printfxy(0,3," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
|
- | 953 | // HoTT_printfxy(0,4,"Dist:%3dm",NaviData_TargetDistance) |
|
- | 954 | break; |
|
- | 955 | case 2: |
|
- | 956 | HoTT_printfxy(11,2,"ALT:%4im", (int16_t)(HoehenWert/100)) |
|
- | 957 | HoTT_printfxy(11,3,"DIR: %3d%c",CompassCorrected, HoTT_GRAD); |
|
- | 958 | HoTT_printfxy(11,4,"Cam: %3i",Parameter_ServoNickControl); |
|
- | 959 | break; |
|
- | 960 | case 3: |
|
- | 961 | case 4: |
|
- | 962 | case 5: |
|
- | 963 | HoTT_printfxy(0,6,"Store point:") |
|
- | 964 | if(wp_tmp) |
|
- | 965 | { |
|
- | 966 | if(changed && HoTTBlink) HoTT_printfxy(13,6," ") |
|
- | 967 | else HoTT_printfxy(13,6,"%2d ",wp_tmp); |
|
- | 968 | } |
|
- | 969 | else |
|
- | 970 | { |
|
- | 971 | HoTT_printfxy(13,6," --") |
|
- | 972 | } |
|
- | 973 | ||
- | 974 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,7,"No SD-Card ") |
|
- | 975 | else |
|
- | 976 | { |
|
- | 977 | if(changed && wp_tmp) HoTT_printfxy(0,7,"(Set -> Store)") |
|
- | 978 | else Hott_ClearLine(7); |
|
- | 979 | } |
|
- | 980 | if(HottKeyboard == HOTT_KEY_UP && wp_tmp < NaviData_MaxWpListIndex) { changed = 1; wp_tmp++; HoTTBlink = 0;} |
|
- | 981 | if(HottKeyboard == HOTT_KEY_DOWN && wp_tmp > 1) { changed = 1; wp_tmp--; HoTTBlink = 0;}; |
|
- | 982 | if(HottKeyboard == HOTT_KEY_SET) { if(wp_tmp) ToNC_Store_SingePoint = wp_tmp; changed = 0;} |
|
- | 983 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page++; line = 0;} |
|
- | 984 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page--; line = 0;}; |
|
- | 985 | HottKeyboard = 0; |
|
- | 986 | break; |
|
- | 987 | default: line = 0; |
|
- | 988 | break; |
|
- | 989 | } |
|
- | 990 | break; |
|
- | 991 | case 6: |
|
- | 992 | switch(line++) |
|
- | 993 | { |
|
- | 994 | static unsigned char wp_tmp, changed; |
|
- | 995 | case 0: |
|
- | 996 | HoTT_printfxy(0,0,"Load single Position"); |
|
- | 997 | // HoTT_printfxy(0,1,"(Fixed Positions)"); |
|
- | 998 | break; |
|
- | 999 | case 1: |
|
- | 1000 | HoTT_printfxy(0,2," %2i.%1iV ",UBat/10, UBat%10) |
|
- | 1001 | HoTT_printfxy(0,3," %2i:%02i ",FlugSekunden/60,FlugSekunden%60); |
|
- | 1002 | // HoTT_printfxy(0,4,"Dist:%3dm",NaviData_TargetDistance) |
|
- | 1003 | if(NaviData_WaypointNumber) HoTT_printfxy(0,5,"Active WP:%2d/%d %dm ",NaviData_WaypointIndex,NaviData_WaypointNumber,NaviData_TargetDistance) |
|
- | 1004 | else Hott_ClearLine(5); |
|
- | 1005 | break; |
|
- | 1006 | case 2: |
|
- | 1007 | HoTT_printfxy(11,2,"ALT:%4im", (int16_t)(HoehenWert/100)) |
|
- | 1008 | HoTT_printfxy(11,3,"DIR: %3d%c",CompassCorrected, HoTT_GRAD); |
|
- | 1009 | HoTT_printfxy(11,4,"Cam: %3i",Parameter_ServoNickControl); |
|
- | 1010 | break; |
|
- | 1011 | // HoTT_printfxy(11,7,"%s",WPL_Name) |
|
- | 1012 | case 3: |
|
- | 1013 | case 4: |
|
- | 1014 | case 5: |
|
- | 1015 | if(HottKeyboard) DebugOut.Analog[17]++; |
|
- | 1016 | HoTT_printfxy(0,6,"load point:") |
|
- | 1017 | if(wp_tmp) |
|
- | 1018 | { |
|
- | 1019 | if(changed && HoTTBlink) HoTT_printfxy(11,6," ") |
|
- | 1020 | else HoTT_printfxy(11,6,"%2d",wp_tmp); |
|
- | 1021 | } |
|
- | 1022 | else |
|
- | 1023 | { |
|
- | 1024 | HoTT_printfxy(11,6," --") |
|
- | 1025 | } |
|
- | 1026 | ||
- | 1027 | if(NaviData_MaxWpListIndex == 0) HoTT_printfxy(0,7,"No SD-Card ") |
|
- | 1028 | else |
|
- | 1029 | { |
|
- | 1030 | if(changed && wp_tmp) HoTT_printfxy(0,7,"(Set -> Load)") |
|
- | 1031 | else Hott_ClearLine(7); |
|
- | 1032 | } |
|
- | 1033 | if(HottKeyboard == HOTT_KEY_UP && wp_tmp < NaviData_MaxWpListIndex) { changed = 1; wp_tmp++; HoTTBlink = 0;} |
|
- | 1034 | if(HottKeyboard == HOTT_KEY_DOWN && wp_tmp > 1) { changed = 1; wp_tmp--; HoTTBlink = 0;}; |
|
- | 1035 | if(HottKeyboard == HOTT_KEY_SET) { if(wp_tmp) ToNC_Load_SingePoint = wp_tmp; changed = 0;} |
|
933 | // if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 4; line = 0;} |
1036 | // if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page++; line = 0;} |
934 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 3; line = 0;}; |
1037 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page--; line = 0;}; |
935 | HottKeyboard = 0; |
1038 | HottKeyboard = 0; |
936 | break; |
1039 | break; |
937 | default: line = 0; |
1040 | default: line = 0; |
938 | break; |
1041 | break; |
939 | } |
1042 | } |
940 | break; |
1043 | break; |
941 | default: page = 0; |
1044 | default: page = 0; |
942 | break; |
1045 | break; |
943 | } |
1046 | } |
944 | } |
1047 | } |
945 | 1048 | ||
946 | #endif |
1049 | #endif |
947 | 1050 | ||
948 | 1051 | ||
949 | 1052 | ||
950 | 1053 |