Subversion Repositories FlightCtrl

Rev

Rev 2050 | Rev 2090 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2050 Rev 2072
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
int HoTTVarioMeter = 0;
87
int HoTTVarioMeter = 0;
88
 
88
 
89
const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] =
89
const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] =
90
{
90
{
91
//0123456789123456
91
//0123456789123456
92
 "No Error        \0",  // 0
92
 "No Error        \0",  // 0
93
 "Not compatible  \0",  // 1
93
 "Not compatible  \0",  // 1
94
 "MK3Mag not compa\0",  // 2
94
 "MK3Mag not compa\0",  // 2
95
 "No FC communicat\0",  // 3
95
 "No FC communicat\0",  // 3
96
 "MK3Mag communica\0",  // 4
96
 "MK3Mag communica\0",  // 4
97
 "GPS communicatio\0",  // 5
97
 "GPS communicatio\0",  // 5
98
 "compass value   \0",  // 6
98
 "compass value   \0",  // 6
99
 "RC Signal lost  \0",  // 7
99
 "RC Signal lost  \0",  // 7
100
 "FC spi rx error \0",  // 8
100
 "FC spi rx error \0",  // 8
101
 "No NC communicat\0",  // 9
101
 "No NC communicat\0",  // 9
102
 "FC Nick Gyro    \0",  // 10
102
 "FC Nick Gyro    \0",  // 10
103
 "FC Roll Gyro    \0",  // 11
103
 "FC Roll Gyro    \0",  // 11
104
 "FC Yaw Gyro     \0",  // 12
104
 "FC Yaw Gyro     \0",  // 12
105
 "FC Nick ACC     \0",  // 13
105
 "FC Nick ACC     \0",  // 13
106
 "FC Roll ACC     \0",  // 14
106
 "FC Roll ACC     \0",  // 14
107
 "FC Z-ACC        \0",  // 15
107
 "FC Z-ACC        \0",  // 15
108
 "Pressure sensor \0",  // 16
108
 "Pressure sensor \0",  // 16
109
 "I2C FC->BL-Ctrl \0",  // 17
109
 "I2C FC->BL-Ctrl \0",  // 17
110
 "Bl Missing      \0",  // 18
110
 "Bl Missing      \0",  // 18
111
 "Mixer Error     \0",  // 19
111
 "Mixer Error     \0",  // 19
112
 "Carefree Error  \0",  // 20
112
 "Carefree Error  \0",  // 20
113
 "GPS Fix lost    \0",  // 21
113
 "GPS Fix lost    \0",  // 21
114
 "Magnet Error    \0",  // 22
114
 "Magnet Error    \0",  // 22
115
 "Motor restart   \0",  // 23
115
 "Motor restart   \0",  // 23
116
 "BL Limitation   \0",  // 24
116
 "BL Limitation   \0",  // 24
117
 "GPS Range       \0",  // 25
117
 "GPS Range       \0",  // 25
118
 "No SD-Card      \0",  // 26
118
 "No SD-Card      \0",  // 26
119
 "SD-Logging error\0",  // 27
119
 "SD-Logging error\0",  // 27
120
 "Flying range!   \0",  // 28
120
 "Flying range!   \0",  // 28
121
 "Max Altitude!   \0"   // 29
121
 "Max Altitude!   \0"   // 29
122
};
122
};
123
 
123
 
124
unsigned char MaxBlTempertaure = 0;
124
unsigned char MaxBlTempertaure = 0;
125
unsigned char MinBlTempertaure = 0;
125
unsigned char MinBlTempertaure = 0;
126
unsigned char HottestBl = 0;
126
unsigned char HottestBl = 0;
127
 
127
 
128
void GetHottestBl(void)
128
void GetHottestBl(void)
129
{
129
{
130
 static unsigned char search = 0,tmp_max,tmp_min,who;
130
 static unsigned char search = 0,tmp_max,tmp_min,who;
131
                if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;}
131
                if(Motor[search].Temperature > tmp_max) { tmp_max = Motor[search].Temperature; who = search;}
132
                else
132
                else
133
                if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature;
133
                if(Motor[search].Temperature) if(Motor[search].Temperature < tmp_min) tmp_min = Motor[search].Temperature;
134
                if(++search > MAX_MOTORS)
134
                if(++search > MAX_MOTORS)
135
                {
135
                {
136
                 search = 0;
136
                 search = 0;
137
                 if(tmp_min != 255) MinBlTempertaure = tmp_min; else MinBlTempertaure = 0;
137
                 if(tmp_min != 255) MinBlTempertaure = tmp_min; else MinBlTempertaure = 0;
138
                 MaxBlTempertaure = tmp_max;
138
                 MaxBlTempertaure = tmp_max;
139
                 HottestBl = who;
139
                 HottestBl = who;
140
                 tmp_min = 255;
140
                 tmp_min = 255;
141
                 tmp_max = 0;
141
                 tmp_max = 0;
142
                 who = 0;
142
                 who = 0;
143
                 }
143
                 }
144
}
144
}
145
 
145
 
146
//---------------------------------------------------------------
146
//---------------------------------------------------------------
147
void Hott_ClearLine(unsigned char line)
147
void Hott_ClearLine(unsigned char line)
148
{
148
{
149
 HoTT_printfxy(0,line,"                     ");
149
 HoTT_printfxy(0,line,"                     ");
150
}
150
}
151
//---------------------------------------------------------------
151
//---------------------------------------------------------------
152
 
152
 
153
unsigned char HoTT_Waring(void)
153
unsigned char HoTT_Waring(void)
154
{
154
{
155
  if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG);
155
  if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG);
156
  if(MotorenEin && NC_ErrorCode)                return(VOICE_BEEP);
156
  if(MotorenEin && NC_ErrorCode)                return(VOICE_BEEP);
157
//if(Parameter_UserParam1) return(Parameter_UserParam1);
157
//if(Parameter_UserParam1) return(Parameter_UserParam1);
158
  return(0);
158
  return(0);
159
}
159
}
160
 
160
 
161
//---------------------------------------------------------------
161
//---------------------------------------------------------------
162
void NC_Fills_HoTT_Telemety(void)
162
void NC_Fills_HoTT_Telemety(void)
163
{
163
{
164
 unsigned char *ptr = NULL;
164
 unsigned char *ptr = NULL;
165
 unsigned char max = 0,i,z;
165
 unsigned char max = 0,i,z;
166
 switch(FromNaviCtrl.Param.Byte[11])
166
 switch(FromNaviCtrl.Param.Byte[11])
167
  {
167
  {
168
   case HOTT_VARIO_PACKET_ID:
168
   case HOTT_VARIO_PACKET_ID:
169
                ptr = (unsigned char *) &VarioPacket;
169
                ptr = (unsigned char *) &VarioPacket;
170
                max = sizeof(VarioPacket);
170
                max = sizeof(VarioPacket);
171
                break;
171
                break;
172
   case HOTT_GPS_PACKET_ID:
172
   case HOTT_GPS_PACKET_ID:
173
                ptr = (unsigned char *) &GPSPacket;
173
                ptr = (unsigned char *) &GPSPacket;
174
                max = sizeof(GPSPacket);
174
                max = sizeof(GPSPacket);
175
                break;
175
                break;
176
   case HOTT_ELECTRIC_AIR_PACKET_ID:
176
   case HOTT_ELECTRIC_AIR_PACKET_ID:
177
                ptr = (unsigned char *) &ElectricAirPacket;
177
                ptr = (unsigned char *) &ElectricAirPacket;
178
                max = sizeof(ElectricAirPacket);
178
                max = sizeof(ElectricAirPacket);
179
                break;
179
                break;
180
   case HOTT_GENERAL_PACKET_ID:
180
   case HOTT_GENERAL_PACKET_ID:
181
                ptr = (unsigned char *) &HoTTGeneral;
181
                ptr = (unsigned char *) &HoTTGeneral;
182
                max = sizeof(HoTTGeneral);
182
                max = sizeof(HoTTGeneral);
183
                break;
183
                break;
184
  }
184
  }
185
 z = FromNaviCtrl.Param.Byte[0]; // Data allocation
185
 z = FromNaviCtrl.Param.Byte[0]; // Data allocation
186
 
186
 
187
 for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++)
187
 for(i=0; i < FromNaviCtrl.Param.Byte[1]; i++)
188
  {
188
  {
189
   if(z >= max) break;
189
   if(z >= max) break;
190
   ptr[z] = FromNaviCtrl.Param.Byte[2+i];
190
   ptr[z] = FromNaviCtrl.Param.Byte[2+i];
191
   z++;
191
   z++;
192
  }
192
  }
193
}
193
}
194
 
194
 
195
unsigned int BuildHoTT_Vario(void)
195
unsigned int BuildHoTT_Vario(void)
196
{
196
{
197
 unsigned int tmp = 30000;
197
 unsigned int tmp = 30000;
198
 if(VarioCharacter == '+' || VarioCharacter == '-')
198
 if(VarioCharacter == '+' || VarioCharacter == '-')
199
  {
199
  {
200
   tmp = 30000 + (AltitudeSetpointTrimming * EE_Parameter.Hoehe_Verstaerkung) / 3;
200
   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
201
   if(tmp < 30000 && tmp > 30000 - 50) tmp = 30000 - 50; // weil es sonst erst bei < 0,5m/sek piept
202
  }
202
  }
203
 else
203
 else
204
 if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY))
204
 if((VarioCharacter == ' ') && (FC_StatusFlags & FC_STATUS_FLY))
205
  {
205
  {
206
   tmp = 30000 + HoTTVarioMeter;
206
   tmp = 30000 + HoTTVarioMeter;
207
   if(tmp > 30000)
207
   if(tmp > 30000)
208
    {
208
    {
209
     if(tmp < 30000 + 100) tmp = 30000;
209
     if(tmp < 30000 + 100) tmp = 30000;
210
         else tmp -= 100;
210
         else tmp -= 100;
211
        }
211
        }
212
   if(tmp < 30000)
212
   if(tmp < 30000)
213
    {
213
    {
214
     if(tmp > 30000 - 100) tmp = 30000;
214
     if(tmp > 30000 - 100) tmp = 30000;
215
         else tmp += 100;
215
         else tmp += 100;
216
        }
216
        }
217
  }
217
  }
218
 else
218
 else
219
 if(VarioCharacter == '^') tmp = 30000 + FromNC_AltitudeSpeed * 10;
219
 if(VarioCharacter == '^') tmp = 30000 + FromNC_AltitudeSpeed * 10;
220
 else
220
 else
221
 if(VarioCharacter == 'v') tmp = 30000 - FromNC_AltitudeSpeed * 10;
221
 if(VarioCharacter == 'v') tmp = 30000 - FromNC_AltitudeSpeed * 10;
222
 
222
 
223
 return(tmp);
223
 return(tmp);
224
}
224
}
225
 
225
 
226
 
226
 
227
//---------------------------------------------------------------
227
//---------------------------------------------------------------
228
unsigned char HoTT_Telemety(unsigned char packet_request)
228
unsigned char HoTT_Telemety(unsigned char packet_request)
229
{
229
{
230
 switch(packet_request)
230
 switch(packet_request)
231
 {
231
 {
232
  case HOTT_VARIO_PACKET_ID:
232
  case HOTT_VARIO_PACKET_ID:
233
                VarioPacket.Altitude = HoehenWert/100 + 500;  
233
                VarioPacket.Altitude = HoehenWert/100 + 500;  
234
                VarioPacket.m_sec = BuildHoTT_Vario();
234
                VarioPacket.m_sec = BuildHoTT_Vario();
235
                VarioPacket.m_3sec = VarioPacket.m_sec;
235
                VarioPacket.m_3sec = VarioPacket.m_sec;
236
                VarioPacket.m_10sec = VarioPacket.m_sec;
236
                VarioPacket.m_10sec = VarioPacket.m_sec;
237
                if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude;
237
                if (VarioPacket.Altitude < VarioPacket.MinAltitude) VarioPacket.MinAltitude = VarioPacket.Altitude;
238
                if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude;            
238
                if (VarioPacket.Altitude > VarioPacket.MaxAltitude) VarioPacket.MaxAltitude = VarioPacket.Altitude;            
239
                VarioPacket.WarnBeep = HoTT_Waring();
239
                VarioPacket.WarnBeep = HoTT_Waring();
240
                HoTT_DataPointer = (unsigned char *) &VarioPacket;
240
                HoTT_DataPointer = (unsigned char *) &VarioPacket;
241
                return(sizeof(VarioPacket));
241
                return(sizeof(VarioPacket));
242
                break;
242
                break;
243
 
243
 
244
  case HOTT_GPS_PACKET_ID:
244
  case HOTT_GPS_PACKET_ID:
245
                GPSPacket.Altitude = HoehenWert/100 + 500;  
245
                GPSPacket.Altitude = HoehenWert/100 + 500;  
246
//              GPSPacket.Distance = GPSInfo.HomeDistance/10;  // macht die NC
246
//              GPSPacket.Distance = GPSInfo.HomeDistance/10;  // macht die NC
247
//              GPSPacket.Heading = GPSInfo.HomeBearing/2;     // macht die NC
247
//              GPSPacket.Heading = GPSInfo.HomeBearing/2;     // macht die NC
248
//              GPSPacket.Speed = (GPSInfo.Speed * 36) / 10;   // macht die NC
248
//              GPSPacket.Speed = (GPSInfo.Speed * 36) / 10;   // macht die NC
249
                GPSPacket.m_sec = BuildHoTT_Vario();
249
                GPSPacket.m_sec = BuildHoTT_Vario();
250
                GPSPacket.m_3sec = 120;
250
                GPSPacket.m_3sec = 120;
251
                GPSPacket.m_10sec = 0;
251
                GPSPacket.m_10sec = 0;
252
                GPSPacket.WarnBeep = HoTT_Waring();
252
                GPSPacket.WarnBeep = HoTT_Waring();
253
                HoTT_DataPointer = (unsigned char *) &GPSPacket;
253
                HoTT_DataPointer = (unsigned char *) &GPSPacket;
254
                return(sizeof(GPSPacket));  
254
                return(sizeof(GPSPacket));  
255
                break;
255
                break;
256
  case HOTT_ELECTRIC_AIR_PACKET_ID:
256
  case HOTT_ELECTRIC_AIR_PACKET_ID:
257
                GetHottestBl();
257
                GetHottestBl();
258
                ElectricAirPacket.Altitude = HoehenWert/100 + 500;
258
                ElectricAirPacket.Altitude = HoehenWert/100 + 500;
259
                ElectricAirPacket.Battery1 = UBat;
259
                ElectricAirPacket.Battery1 = UBat;
260
                ElectricAirPacket.Battery2 = UBat;
260
                ElectricAirPacket.Battery2 = UBat;
261
                ElectricAirPacket.VoltageCell1 = ErsatzKompassInGrad / 2;
261
                ElectricAirPacket.VoltageCell1 = ErsatzKompassInGrad / 2;
262
                ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1;
262
                ElectricAirPacket.VoltageCell8 = ElectricAirPacket.VoltageCell1;
263
                ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2;
263
                ElectricAirPacket.VoltageCell6 = GPSInfo.HomeBearing / 2;
264
                ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20;
264
                ElectricAirPacket.VoltageCell7 = GPSInfo.HomeDistance/20;
265
                ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6;
265
                ElectricAirPacket.VoltageCell13 = ElectricAirPacket.VoltageCell6;
266
                ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7;
266
                ElectricAirPacket.VoltageCell14 = ElectricAirPacket.VoltageCell7;
267
                ElectricAirPacket.m_sec = BuildHoTT_Vario();
267
                ElectricAirPacket.m_sec = BuildHoTT_Vario();
268
                ElectricAirPacket.m_3sec = 120;
268
                ElectricAirPacket.m_3sec = 120;
269
                ElectricAirPacket.InputVoltage = UBat;
269
                ElectricAirPacket.InputVoltage = UBat;
270
                ElectricAirPacket.Temperature1 = MinBlTempertaure + 20;
270
                ElectricAirPacket.Temperature1 = MinBlTempertaure + 20;
271
                ElectricAirPacket.Temperature2 = MaxBlTempertaure + 20;
271
                ElectricAirPacket.Temperature2 = MaxBlTempertaure + 20;
272
                ElectricAirPacket.Capacity = Capacity.UsedCapacity/10;
272
                ElectricAirPacket.Capacity = Capacity.UsedCapacity/10;
273
                ElectricAirPacket.WarnBeep = HoTT_Waring();
273
                ElectricAirPacket.WarnBeep = HoTT_Waring();
274
                ElectricAirPacket.Current = Capacity.ActualCurrent;
274
                ElectricAirPacket.Current = Capacity.ActualCurrent;
275
                HoTT_DataPointer = (unsigned char *) &ElectricAirPacket;
275
                HoTT_DataPointer = (unsigned char *) &ElectricAirPacket;
276
                return(sizeof(ElectricAirPacket));
276
                return(sizeof(ElectricAirPacket));
277
                break;
277
                break;
278
  case HOTT_GENERAL_PACKET_ID:
278
  case HOTT_GENERAL_PACKET_ID:
279
                GetHottestBl();
279
                GetHottestBl();
280
                HoTTGeneral.Rpm = GPSInfo.HomeDistance/100;
280
                HoTTGeneral.Rpm = GPSInfo.HomeDistance/100;
281
                HoTTGeneral.VoltageCell1 = ErsatzKompassInGrad / 2;
281
                HoTTGeneral.VoltageCell1 = ErsatzKompassInGrad / 2;
282
                HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2;
282
                HoTTGeneral.VoltageCell6 = GPSInfo.HomeBearing / 2;
283
                if(UBat > BattLowVoltageWarning + 5) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 6)) * 3;
283
                if(UBat > BattLowVoltageWarning + 5) HoTTGeneral.FuelPercent = (UBat - (BattLowVoltageWarning + 6)) * 3;
284
                else HoTTGeneral.FuelPercent = 0;
284
                else HoTTGeneral.FuelPercent = 0;
285
                HoTTGeneral.FuelCapacity = HoehenWert/100;
285
                HoTTGeneral.FuelCapacity = HoehenWert/100;
286
                if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0;
286
                if(HoTTGeneral.FuelCapacity < 0) HoTTGeneral.FuelCapacity = 0;
287
                HoTTGeneral.Altitude = HoehenWert/100 + 500;
287
                HoTTGeneral.Altitude = HoehenWert/100 + 500;
288
                HoTTGeneral.Battery1 = UBat;
288
                HoTTGeneral.Battery1 = UBat;
289
                HoTTGeneral.Battery2 = UBat;
289
                HoTTGeneral.Battery2 = UBat;
290
                HoTTGeneral.m_sec =  BuildHoTT_Vario();
290
                HoTTGeneral.m_sec =  BuildHoTT_Vario();
291
                HoTTGeneral.m_3sec = 120;
291
                HoTTGeneral.m_3sec = 120;
292
                HoTTGeneral.InputVoltage = UBat;
292
                HoTTGeneral.InputVoltage = UBat;
293
                HoTTGeneral.Temperature1 = MinBlTempertaure + 20;
293
                HoTTGeneral.Temperature1 = MinBlTempertaure + 20;
294
                HoTTGeneral.Temperature2 = MaxBlTempertaure + 20;
294
                HoTTGeneral.Temperature2 = MaxBlTempertaure + 20;
295
                HoTTGeneral.Capacity = Capacity.UsedCapacity/10;
295
                HoTTGeneral.Capacity = Capacity.UsedCapacity/10;
296
                HoTTGeneral.WarnBeep = HoTT_Waring();
296
                HoTTGeneral.WarnBeep = HoTT_Waring();
297
                HoTTGeneral.Current = Capacity.ActualCurrent;
297
                HoTTGeneral.Current = Capacity.ActualCurrent;
298
                HoTT_DataPointer = (unsigned char *) &HoTTGeneral;
298
                HoTT_DataPointer = (unsigned char *) &HoTTGeneral;
299
                return(sizeof(HoTTGeneral));
299
                return(sizeof(HoTTGeneral));
300
                break;
300
                break;
301
  default: return(0);
301
  default: return(0);
302
  }            
302
  }            
303
}
303
}
304
 
304
 
305
//---------------------------------------------------------------
305
//---------------------------------------------------------------
306
void HoTT_Menu(void)
306
void HoTT_Menu(void)
307
{
307
{
308
 static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0;
308
 static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0;
309
 unsigned char tmp;
309
 unsigned char tmp;
310
 HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8;
310
 HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8;
311
 
311
 
312
 if(page == 0)
312
 if(page == 0)
313
  switch(line++)
313
  switch(line++)
314
  {
314
  {
315
        case 0:  
315
        case 0:  
316
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
316
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
317
                         HoTT_printfxy_BLINK(0,0,"  %2i.%1iV  ",UBat/10, UBat%10)
317
                         HoTT_printfxy_BLINK(0,0,"  %2i.%1iV  ",UBat/10, UBat%10)
318
                        else
318
                        else
319
                         HoTT_printfxy(0,0,"  %2i.%1iV  ",UBat/10, UBat%10)
319
                         HoTT_printfxy(0,0,"  %2i.%1iV  ",UBat/10, UBat%10)
320
 
320
 
321
                        if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
321
                        if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
322
                          {
322
                          {
323
                           if(HoehenReglerAktiv)        HoTT_printfxy_INV(10,0,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter)
323
                           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))
324
                           else                                         HoTT_printfxy(10,0,"ALT:%4im  ", (int16_t)(HoehenWert/100))
325
                           }
325
                           }
326
            else    HoTT_printfxy(10,0,"ALT:---- ");
326
            else    HoTT_printfxy(10,0,"ALT:---- ");
327
                        break;
327
                        break;
328
        case 1:  
328
        case 1:  
329
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
329
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
330
                         HoTT_printfxy_BLINK(0,1,"  %2i:%02i  ",FlugSekunden/60,FlugSekunden%60)
330
                         HoTT_printfxy_BLINK(0,1,"  %2i:%02i  ",FlugSekunden/60,FlugSekunden%60)
331
            else   HoTT_printfxy(0,1,"  %2i:%02i  ",FlugSekunden/60,FlugSekunden%60);                      
331
            else   HoTT_printfxy(0,1,"  %2i:%02i  ",FlugSekunden/60,FlugSekunden%60);                      
332
                        HoTT_printfxy(10,1,"DIR: %3d%c",ErsatzKompassInGrad, HoTT_GRAD);
332
                        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," ");
333
                        if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(20,1,"C") else HoTT_printfxy(20,1," ");
334
            break;
334
            break;
335
        case 2:
335
        case 2:
336
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
336
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
337
                         HoTT_printfxy_BLINK(0,2,"  %5i  ",Capacity.UsedCapacity)
337
                         HoTT_printfxy_BLINK(0,2,"  %5i  ",Capacity.UsedCapacity)
338
            else   HoTT_printfxy(0,2,"  %5i  ",Capacity.UsedCapacity);                     
338
            else   HoTT_printfxy(0,2,"  %5i  ",Capacity.UsedCapacity);                     
339
                        HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10);
339
                        HoTT_printfxy(12,2,"I:%2i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10);
340
                        break;
340
                        break;
341
        case 3:
341
        case 3:
342
                        HoTT_printfxy(9,0,"I");
342
                        HoTT_printfxy(9,0,":");
343
                        HoTT_printfxy(9,1,"I");
343
                        HoTT_printfxy(9,1,":");
344
                        HoTT_printfxy(9,2,"I");
344
                        HoTT_printfxy(9,2,":");
345
                        HoTT_printfxy(0,3,"---------+-----------");
345
                        HoTT_printfxy(0,3,"---------+-----------");
-
 
346
 
-
 
347
//                      HoTT_printfxy(0,3,"---------------------");
346
                        HoTT_printfxy(0,6,"---------------------");
348
                        HoTT_printfxy(0,6,"---------------------");
347
                        break;
349
                        break;
348
        case 4:  
350
        case 4:  
349
                        if(NaviDataOkay)
351
                        if(NaviDataOkay)
350
                        {
352
                        {
351
                        HoTT_printfxy(9,4,"I");
353
                                HoTT_printfxy(9,4,":");
352
                                HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats);
354
                                HoTT_printfxy(0,4,"SAT:%2d ",GPSInfo.NumOfSats);
353
                            HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10);
355
                            HoTT_printfxy(10,4,"DIST:%3dm",GPSInfo.HomeDistance/10);
354
                                switch (GPSInfo.SatFix)
356
                                switch (GPSInfo.SatFix)
355
                                {
357
                                {
356
                                        case SATFIX_3D:
358
                                        case SATFIX_3D:
357
                                                        if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ")
359
                                                        if(GPSInfo.Flags & FLAG_DIFFSOLN) HoTT_printfxy(7,4,"D ")
358
                                                        else HoTT_printfxy(7,4,"3D");
360
                                                        else HoTT_printfxy(7,4,"3D");
359
                                                break;
361
                                                break;
360
                                        default:
362
                                        default:
361
                                                HoTT_printfxy_BLINK(7,4,"!!");
363
                                                HoTT_printfxy_BLINK(7,4,"!!");
362
                                                break;
364
                                                break;
363
                                }      
365
                                }      
364
                        }
366
                        }
365
                        else
367
                        else
366
                        {                    
368
                        {                    
367
                                Hott_ClearLine(4);
369
                                Hott_ClearLine(4);
368
                        }
370
                        }
369
                        break;
371
                        break;
370
        case 5:
372
        case 5:
371
                        if(NaviDataOkay)
373
                        if(NaviDataOkay)
372
                        {
374
                        {
373
                        if(show_mag)
375
                        if(show_mag)
374
                          {
376
                          {
375
                                HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField);
377
                                HoTT_printfxy(0,5,"MAG:%3u%% ",EarthMagneticField);
376
                            HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter);
378
                            HoTT_printfxy(12,5,"HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter);
377
                                HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic);
379
                                HoTT_printfxy(9,5,"incl:%2d%c(%2i)",EarthMagneticInclination, HoTT_GRAD,EarthMagneticInclinationTheoretic);
378
              }
380
              }
379
                         else
381
                         else
380
                          {
382
                          {
381
                        HoTT_printfxy(9,5,"I");
383
                        //HoTT_printfxy(9,5,":");
382
                                HoTT_printfxy(0,5,"    %2um/s",GPSInfo.Speed,GPSInfo.NumOfSats);
384
                                HoTT_printfxy(0,5,"    %2um/s:  HM:%3d%c %c",GPSInfo.Speed, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter);
383
                            HoTT_printfxy(11,5," HM:%3d%c %c", GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter);
385
//                          HoTT_printfxy(11,5,"");
384
                          }    
386
                          }    
385
            }
387
            }
386
                        else Hott_ClearLine(5);
388
                        else Hott_ClearLine(5);
387
                        break;
389
                        break;
388
        case 6:
390
        case 6:
389
                        break;
391
                        break;
390
        case 7: if(NC_ErrorCode)
392
        case 7: if(NC_ErrorCode)
391
                  {
393
                  {
392
                           if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER)
394
                           if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER)
393
                            {
395
                            {
394
                             Hott_ClearLine(7);
396
                             Hott_ClearLine(7);
395
                             HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode);
397
                             HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode);
396
                            }
398
                            }
397
                                else
399
                                else
398
                                {
400
                                {
399
                                 HoTT_printfxy(0,7,"ERR: ");     _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);};
401
                                 HoTT_printfxy(0,7,"ERR: ");     _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);};
400
                                }
402
                                }
401
                        else HoTT_printfxy(0,7," www.MikroKopter.de  ");
403
                        else HoTT_printfxy(0,7," www.MikroKopter.de  ");
402
                        break;
404
                        break;
403
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
405
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
404
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
406
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
405
        case 9:
407
        case 9:
406
        case 10:
408
        case 10:
407
        case 11:
409
        case 11:
408
        case 12:
410
        case 12:
409
        case 13:
411
        case 13:
410
        case 14:  
412
        case 14:  
411
        case 15:  
413
        case 15:  
412
        case 16:  
414
        case 16:  
413
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;}
415
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_mag) show_mag = 0; else show_mag = 1;}
414
                        else
416
                        else
415
                        if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;};
417
                        if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 1; line = 0;};
416
                        HottKeyboard = 0;
418
                        HottKeyboard = 0;
417
                        break;
419
                        break;
418
   default:  line = 0;
420
   default:  line = 0;
419
                        break;
421
                        break;
420
  }
422
  }
421
  else
423
  else
422
  if(page == 1)
424
  if(page == 1)
423
  switch(line++)
425
  switch(line++)
424
  {
426
  {
425
        case 0:  
427
        case 0:  
426
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
428
                if(FC_StatusFlags & FC_STATUS_LOWBAT)
427
                         HoTT_printfxy_BLINK(0,0," %2i:%02i  %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity)
429
                         HoTT_printfxy_BLINK(0,0," %2i:%02i  %2i.%1iV %4imAh",FlugSekunden/60,FlugSekunden%60,UBat/10, UBat%10,Capacity.UsedCapacity)
428
            else   HoTT_printfxy(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);                         
429
                        break;
431
                        break;
430
        case 1:  
432
        case 1:  
431
                        HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD);
433
                        HoTT_printfxy(0,1,"DIR:%3d%c",KompassValue, HoTT_GRAD);
432
                        if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
434
                        if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
433
                          {
435
                          {
434
                           if(HoehenReglerAktiv)        HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
436
                           if(HoehenReglerAktiv)        HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
435
                           else                                         HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
437
                           else                                         HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
436
                           }
438
                           }
437
            else    HoTT_printfxy(10,1,"ALT:---- ");
439
            else    HoTT_printfxy(10,1,"ALT:---- ");
438
                        HoTT_printfxy(20,1,"%c",VarioCharacter);
440
                        HoTT_printfxy(20,1,"%c",VarioCharacter);
439
            break;
441
            break;
440
        case 2:
442
        case 2:
441
                        if(NaviDataOkay)
443
                        if(NaviDataOkay)
442
                        {
444
                        {
443
                          HoTT_printfxy(1,2,"HM:%3d%c  DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter);
445
                          HoTT_printfxy(1,2,"HM:%3d%c  DIST:%3dm %c", GPSInfo.HomeBearing, HoTT_GRAD, GPSInfo.HomeDistance/10, NC_GPS_ModeCharacter);
444
            }
446
            }
445
                        else
447
                        else
446
                        {
448
                        {
447
                         Hott_ClearLine(2);
449
                         Hott_ClearLine(2);
448
                        }
450
                        }
449
                        break;
451
                        break;
450
        case 3:
452
        case 3:
451
                        HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower);
453
                        HoTT_printfxy(0,3,"PWR:%2i.%1iA (%iW) ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower);
452
                        if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3,"  ");
454
                        if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(19,3,"CF") else HoTT_printfxy(19,3,"  ");
453
                        break;
455
                        break;
454
        case 4:  
456
        case 4:  
455
                        if(NaviDataOkay)
457
                        if(NaviDataOkay)
456
                        {
458
                        {
457
                                HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats);
459
                                HoTT_printfxy(0,4,"GPS:%2um/s SAT:%d ",GPSInfo.Speed,GPSInfo.NumOfSats);
458
                                switch (GPSInfo.SatFix)
460
                                switch (GPSInfo.SatFix)
459
                                {
461
                                {
460
                                        case SATFIX_3D:
462
                                        case SATFIX_3D:
461
                                                HoTT_printfxy(16,4,"  3D ");
463
                                                HoTT_printfxy(16,4,"  3D ");
462
                                                break;
464
                                                break;
463
                                        //case SATFIX_2D:
465
                                        //case SATFIX_2D:
464
                                        //case SATFIX_NONE:
466
                                        //case SATFIX_NONE:
465
                                        default:
467
                                        default:
466
                                                HoTT_printfxy_BLINK(16,4,"NOFIX");
468
                                                HoTT_printfxy_BLINK(16,4,"NOFIX");
467
                                                break;
469
                                                break;
468
                                }      
470
                                }      
469
                                if(GPSInfo.Flags & FLAG_DIFFSOLN)
471
                                if(GPSInfo.Flags & FLAG_DIFFSOLN)
470
                                {
472
                                {
471
                                        HoTT_printfxy(16,4,"DGPS ");
473
                                        HoTT_printfxy(16,4,"DGPS ");
472
                                }
474
                                }
473
                        }
475
                        }
474
                        else
476
                        else
475
                        {                    //012345678901234567890
477
                        {                    //012345678901234567890
476
                                HoTT_printfxy(0,4,"   No NaviCtrl       ");
478
                                HoTT_printfxy(0,4,"   No NaviCtrl       ");
477
                        }
479
                        }
478
                        break;
480
                        break;
479
        case 5:
481
        case 5:
480
                        if(show_current)
482
                        if(show_current)
481
                         {
483
                         {
482
                                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);
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);
483
                         }
485
                         }
484
                         else
486
                         else
485
                         {
487
                         {
486
                                HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD);
488
                                HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD);
487
                         }
489
                         }
488
                        break;
490
                        break;
489
        case 6:
491
        case 6:
490
                        if(show_current)
492
                        if(show_current)
491
                         {
493
                         {
492
                    if(RequiredMotors == 4) Hott_ClearLine(6);
494
                    if(RequiredMotors == 4) Hott_ClearLine(6);
493
                                else
495
                                else
494
                                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)
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)
495
                                else
497
                                else
496
                                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);
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);
497
             }
499
             }
498
                         else
500
                         else
499
                         {
501
                         {
500
                    if(RequiredMotors == 4) Hott_ClearLine(6);
502
                    if(RequiredMotors == 4) Hott_ClearLine(6);
501
                                else
503
                                else
502
                                if(RequiredMotors == 6)  HoTT_printfxy(0,6,"%3i %3i%cC        ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD)
504
                                if(RequiredMotors == 6)  HoTT_printfxy(0,6,"%3i %3i%cC        ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD)
503
                                else
505
                                else
504
                                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);
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);
505
             }
507
             }
506
                        break;
508
                        break;
507
        case 7: if(NC_ErrorCode)
509
        case 7: if(NC_ErrorCode)
508
                  {
510
                  {
509
                           if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER)
511
                           if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER)
510
                            {
512
                            {
511
                             Hott_ClearLine(7);
513
                             Hott_ClearLine(7);
512
                             HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode);
514
                             HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode);
513
                            }
515
                            }
514
                                else
516
                                else
515
                                {
517
                                {
516
                                 HoTT_printfxy(0,7,"ERR: ");     _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);};
518
                                 HoTT_printfxy(0,7,"ERR: ");     _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);};
517
                                }
519
                                }
518
                        else HoTT_printfxy(0,7," www.MikroKopter.de  ");
520
                        else HoTT_printfxy(0,7," www.MikroKopter.de  ");
519
                        break;
521
                        break;
520
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
522
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
521
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
523
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
522
        case 9:
524
        case 9:
523
        case 10:
525
        case 10:
524
        case 11:
526
        case 11:
525
        case 12:
527
        case 12:
526
        case 13:
528
        case 13:
527
        case 14:  
529
        case 14:  
528
        case 15:  
530
        case 15:  
529
        case 16:  
531
        case 16:  
530
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1;   Hott_ClearLine(5);  Hott_ClearLine(6);}
532
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_current) show_current = 0; else show_current = 1;   Hott_ClearLine(5);  Hott_ClearLine(6);}
531
                        else
533
                        else
532
                        if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;}
534
                        if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 2; line = 0;}
533
                        else
535
                        else
534
                        if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;}
536
                        if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 0; line = 0;}
535
//if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard);
537
//if(HottKeyboard) HoTT_printfxy(15,6,"%KEY:%02x ",HottKeyboard);
536
                        HottKeyboard = 0;
538
                        HottKeyboard = 0;
537
                        break;
539
                        break;
538
   default:  line = 0;
540
   default:  line = 0;
539
                        break;
541
                        break;
540
  }
542
  }
541
  else
543
  else
542
  if(page == 2)
544
  if(page == 2)
543
  switch(line++)
545
  switch(line++)
544
  {
546
  {
545
        case 0:  
547
        case 0:  
546
                        HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name);
548
                        HoTT_printfxy_INV(0,0,"Setting:%u %s ",GetActiveParamSet(),EE_Parameter.Name);
547
                        break;
549
                        break;
548
    case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name);
550
    case 1: HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name);
549
                        break;
551
                        break;
550
    case 2:  HoTT_printfxy(0,2,"ALT:");
552
    case 2:  HoTT_printfxy(0,2,"ALT:");
551
                 if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
553
                 if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
552
                 {
554
                 {
553
                          if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter)
555
                          if(!(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) HoTT_printf("POTI:%3u ", Parameter_HoehenSchalter)
554
                          else
556
                          else
555
                          {
557
                          {
556
                           if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON)  ") else HoTT_printf("(OFF) ");
558
                           if(Parameter_HoehenSchalter > 50) HoTT_printf("(ON)  ") else HoTT_printf("(OFF) ");
557
                           if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter)
559
                           if((Parameter_ExtraConfig & CFG2_HEIGHT_LIMIT)) HoTT_printf("LIMIT", Parameter_HoehenSchalter)
558
                           else HoTT_printf("VARIO", Parameter_HoehenSchalter);
560
                           else HoTT_printf("VARIO", Parameter_HoehenSchalter);
559
                          }
561
                          }
560
                         }
562
                         }
561
                        else
563
                        else
562
                                HoTT_printf("DISABLED");
564
                                HoTT_printf("DISABLED");
563
                        break;
565
                        break;
564
    case 3: HoTT_printfxy(0,3,"CF:");
566
    case 3: HoTT_printfxy(0,3,"CF:");
565
                        if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED")
567
                        if(!EE_Parameter.CareFreeModeControl) HoTT_printf("DISABLED")
566
                        else
568
                        else
567
                         {
569
                         {
568
                          if(CareFree)  HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)");
570
                          if(CareFree)  HoTT_printf(" (ON) ") else HoTT_printf(" (OFF)");
569
                          if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH");
571
                          if(EE_Parameter.ExtraConfig & CFG_LEARNABLE_CAREFREE) HoTT_printf(" TEACH");
570
                         }
572
                         }
571
                        break;
573
                        break;
572
    case 4: HoTT_printfxy(0,4,"GPS:");
574
    case 4: HoTT_printfxy(0,4,"GPS:");
573
                    if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED")
575
                    if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) HoTT_printf("DISABLED")
574
                        else
576
                        else
575
                         {
577
                         {
576
                          CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl);
578
                          CHK_POTI(tmp,EE_Parameter.NaviGpsModeControl);
577
                          if(tmp < 50) HoTT_printf("(FREE)")
579
                          if(tmp < 50) HoTT_printf("(FREE)")
578
                          else
580
                          else
579
                          if(tmp >= 180) HoTT_printf("(HOME)")
581
                          if(tmp >= 180) HoTT_printf("(HOME)")
580
                          else
582
                          else
581
                          if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ")
583
                          if(EE_Parameter.ExtraConfig & CFG_GPS_AID) HoTT_printf("(AID) ")
582
                          else HoTT_printf("(HOLD)")
584
                          else HoTT_printf("(HOLD)")
583
                         }
585
                         }
584
                        if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime)
586
                        if(EE_Parameter.FailSafeTime) HoTT_printfxy(10,4," FS:%usek ",EE_Parameter.FailSafeTime)
585
 
587
 
586
                        break;
588
                        break;
587
    case 5: HoTT_printfxy(0,5,"HOME ALT:");
589
    case 5: HoTT_printfxy(0,5,"HOME ALT:");
588
                        if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD ");
590
                        if(EE_Parameter.ComingHomeAltitude) HoTT_printf("%um",EE_Parameter.ComingHomeAltitude) else HoTT_printf("HOLD ");
589
                        break;
591
                        break;
590
        case 6:
592
        case 6:
591
                        if(!show_poti)
593
                        if(!show_poti)
592
                         {
594
                         {
593
              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);
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);
594
                      HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]);
596
                      HoTT_printfxy(0,7,"Gs:%4i Ya:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]+127,PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]);
595
                         }
597
                         }
596
                        else
598
                        else
597
                         {
599
                         {
598
              HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3);
600
              HoTT_printfxy(0,6,"P1:%4i P2:%4i 3:%3i",Poti1,Poti2, Poti3);
599
                      HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6);
601
                      HoTT_printfxy(0,7,"P4:%4i P5:%4i 6:%3i",Poti4,Poti5, Poti6);
600
                         }
602
                         }
601
 
603
 
602
                        break;
604
                        break;
603
    case 7: //HoTT_printfxy(0,6,"WARNINGS:");
605
    case 7: //HoTT_printfxy(0,6,"WARNINGS:");
604
                        if(HoTTBlink)
606
                        if(HoTTBlink)
605
                        {
607
                        {
606
                         LIBFC_HoTT_SetPos(6 * 21);
608
                         LIBFC_HoTT_SetPos(6 * 21);
607
                         if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! ");
609
                         if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! ");
608
                         if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! ");
610
                         if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! ");
609
                         if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! ");
611
                         if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! ");
610
                         if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! ");
612
                         if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! ");
611
                        }
613
                        }
612
                        break;
614
                        break;
613
    case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
615
    case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
614
                        break;
616
                        break;
615
    case 9:
617
    case 9:
616
    case 10:
618
    case 10:
617
    case 11:
619
    case 11:
618
    case 12:
620
    case 12:
619
    case 13:
621
    case 13:
620
    case 14:
622
    case 14:
621
    case 15:
623
    case 15:
622
    case 16:
624
    case 16:
623
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1;   Hott_ClearLine(6);  Hott_ClearLine(7);}
625
                        if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1;   Hott_ClearLine(6);  Hott_ClearLine(7);}
624
                        else
626
                        else
625
                        if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;};
627
                        if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;};
626
                        HottKeyboard = 0;
628
                        HottKeyboard = 0;
627
                        break;
629
                        break;
628
   default:  line = 0;
630
   default:  line = 0;
629
                        break;
631
                        break;
630
  }
632
  }
631
  else page = 0;
633
  else page = 0;
632
}
634
}
633
 
635
 
634
#endif
636
#endif
635
 
637
 
636
 
638
 
637
       
639
       
638
 
640