Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2506 - 1
#ifndef _HOTTMENU_H
2
#define _HOTTMENU_H
3
 
4
extern unsigned char NaviData_WaypointIndex;
5
extern unsigned char NaviData_WaypointNumber, NaviData_TargetHoldTime,ToNC_Load_WP_List,NaviData_MaxWpListIndex;
6
extern unsigned char ToNC_Load_SingePoint, ToNC_Store_SingePoint;
7
 
8
extern char WPL_Name[10];
9
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
10
 
11
#define SPEAK_ERR_CALIBARTION  1
12
#define SPEAK_ERR_RECEICER       2
13
#define SPEAK_ERR_DATABUS        3
14
#define SPEAK_ERR_NAVI           4
15
#define SPEAK_ERROR                      5
16
#define SPEAK_ERR_COMPASS        6
17
#define SPEAK_ERR_SENSOR         7
18
#define SPEAK_ERR_GPS            8
19
#define SPEAK_ERR_MOTOR          9
20
#define SPEAK_MAX_TEMPERAT  10
21
#define SPEAK_ALTI_REACHED  11
22
#define SPEAK_WP_REACHED    12
23
#define SPEAK_NEXT_WP       13
24
#define SPEAK_LANDING       14
25
#define SPEAK_GPS_FIX       15
26
#define SPEAK_UNDERVOLTAGE  16
27
#define SPEAK_GPS_HOLD      17
28
#define SPEAK_GPS_HOME      18
29
#define SPEAK_GPS_OFF       19
30
#define SPEAK_BEEP          20
31
#define SPEAK_MIKROKOPTER   21
32
#define SPEAK_CAPACITY      22
33
#define SPEAK_CF_OFF        23
34
#define SPEAK_CALIBRATE     24
35
#define SPEAK_MAX_RANGE     25
36
#define SPEAK_MAX_ALTITUD   26
37
 
38
#define SPEAK_MK_OFF            38
39
#define SPEAK_ALTITUDE_ON       39
40
#define SPEAK_ALTITUDE_OFF      40
41
#define SPEAK_CF_ON             46
42
#define SPEAK_SINKING           47
43
#define SPEAK_RISING            48
44
#define SPEAK_HOLDING           49
45
#define SPEAK_GPS_ON            50
46
#define SPEAK_FOLLWING          51
47
#define SPEAK_STARTING      52
48
 
49
#define MAX_ERR_NUMBER (34+1)
50
extern const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17];
51
extern unsigned int NaviData_TargetDistance;
52
extern unsigned char MaxBlTemperture;
53
extern unsigned char MinBlTemperture;
54
extern unsigned char HottestBl;
55
 
56
extern unsigned char HottKeyboard,HoTT_RequestedSensor;
57
extern unsigned char HottUpdate(unsigned char key);
58
extern unsigned char SpeakHoTT,ShowSettingNameTime;
59
extern unsigned char ToNC_SpeakHoTT;
60
extern volatile unsigned char *HoTT_DataPointer;
61
 
62
extern void CreateHoTT_Menu(void);
63
extern void LIBFC_HoTT_Putchar(char);
64
extern void LIBFC_HoTT_Putchar_INV(char); // print Invers
65
extern void LIBFC_HoTT_Putchar_BLINK(char);
66
extern void LIBFC_HoTT_SetPos(unsigned char);
67
extern void LIBFC_HoTT_Clear(void);
68
extern void NC_Fills_HoTT_Telemety(void);
69
extern void HoTT_Menu(void);
70
extern unsigned char HoTT_Telemety(unsigned char);
71
extern unsigned char HoTT_Waring(void);
72
extern volatile unsigned char HoTTBlink;
73
extern void GetHottestBl(void);
74
 
75
typedef struct
76
{
77
  unsigned char StartByte;      // 0x7C
78
  unsigned char Packet_ID;      // HOTT_GENERAL_PACKET_ID       
79
  unsigned char WarnBeep;       // 3 Anzahl der Töne 0..36
80
  unsigned char SensorID;       // 4 0xD0
81
  unsigned char InverseStatus1; // 5  
82
  unsigned char InverseStatus2; // 6
83
  unsigned char VoltageCell1;   // 7 208 = 4,16V  (Voltage * 50 = Wert)
84
  unsigned char VoltageCell2;   // 8 209 = 4,18V
85
  unsigned char VoltageCell3;   // 9
86
  unsigned char VoltageCell4;   // 10
87
  unsigned char VoltageCell5;   // 11
88
  unsigned char VoltageCell6;   // 12
89
  unsigned int  Battery1;               // 13+14 51  = 5,1V
90
  unsigned int  Battery2;               // 15+16 51  = 5,1V
91
  unsigned char Temperature1;   // 17 44 = 24°C, 0 = -20°C
92
  unsigned char Temperature2;   // 18 44 = 24°C, 0 = -20°C
93
  unsigned char FuelPercent;    // 19
94
    signed int  FuelCapacity;   // 20+21
95
  unsigned int  Rpm;                    // 22+23
96
    signed int  Altitude;               // 24+25
97
  unsigned int  m_sec;              // 26+27 3000 = 0
98
  unsigned char m_3sec;             // 28 120 = 0
99
  unsigned int  Current;                // 29+30 1 = 0.1A
100
  unsigned int  InputVoltage;   // 31+32 66  = 6,6V
101
  unsigned int  Capacity;               // 33+34 1  = 10mAh
102
  unsigned int  Speed;                  // 35+36
103
  unsigned char LowestCellVoltage;      // 37
104
  unsigned char LowestCellNumber;       // 38
105
  unsigned int  Rpm2;                           // 39+40
106
  unsigned char ErrorNumber;            // 41
107
  unsigned char Pressure;           // 42  in 0,1bar 20=2,0bar
108
  unsigned char Version;            // 43
109
  unsigned char EndByte;                // 0x7D
110
} HoTTGeneral_t;
111
 
112
typedef struct
113
{
114
  unsigned char StartByte;      // 0x7C
115
  unsigned char Packet_ID;      // HOTT_ELECTRIC_AIR_PACKET_ID  
116
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
117
  unsigned char SensorID;       // 4 0xE0
118
  unsigned char InverseStatus1; // 5  
119
  unsigned char InverseStatus2; // 6
120
  unsigned char VoltageCell1;   // 7 208 = 4,16V  (Voltage * 50 = Wert)
121
  unsigned char VoltageCell2;   // 209 = 4,18V
122
  unsigned char VoltageCell3;   // 
123
  unsigned char VoltageCell4;   // 
124
  unsigned char VoltageCell5;   // 
125
  unsigned char VoltageCell6;   // 
126
  unsigned char VoltageCell7;   // 
127
  unsigned char VoltageCell8;   // 
128
  unsigned char VoltageCell9;   // 
129
  unsigned char VoltageCell10;  // 
130
  unsigned char VoltageCell11;  // 
131
  unsigned char VoltageCell12;  // 
132
  unsigned char VoltageCell13;  // 
133
  unsigned char VoltageCell14;  // 20 
134
  unsigned int  Battery1;               // 21+22 51  = 5,1V
135
  unsigned int  Battery2;               // 23+24 51  = 5,1V
136
  unsigned char Temperature1;   // 25 44 = 24°C, 0 = -20°C
137
  unsigned char Temperature2;   // 26 44 = 24°C, 0 = -20°C
138
    signed int  Altitude;               // 27+28
139
  unsigned int  Current;                // 29+30 1 = 0.1A
140
  unsigned int  InputVoltage;   // 31+32 66  = 6,6V
141
  unsigned int  Capacity;               // 33+34 1  = 10mAh
142
  unsigned int  m_sec;              // 35+36 30000 = 0
143
  unsigned char m_3sec;             // 37 120 = 0
144
  unsigned int  Rpm;                    // 38+39
145
  unsigned char FlightTimeMinutes; // 40
146
  unsigned char FlightTimeSeconds; // 41
147
  unsigned char Speed;                  // 42  1=2km 
148
  unsigned char Version;                // 43 0x00
149
  unsigned char EndByte;                // 0x7D
150
} ElectricAirPacket_t;
151
 
152
 
153
typedef struct
154
{
155
  unsigned char StartByte;      // 0x7C
156
  unsigned char Packet_ID;      // 0x89  - Vario ID 
157
  unsigned char WarnBeep;   //3         // Anzahl der Töne 0..36
158
  unsigned char SensorID;        // 0x90
159
  unsigned char InverseStatus;  
160
    signed int Altitude;        //6+7    // 500 = 0m
161
    signed int MaxAltitude;     //8+9    // 500 = 0m
162
        signed int MinAltitude; //10+11   // 500 = 0m
163
  unsigned int m_sec;           //12+13    // 3000 = 0
164
  unsigned int  m_3sec;         //14+15    
165
  unsigned int  m_10sec;        //26+17
166
  char              Text[21];   //18-38
167
  char              FreeCharacters[3]; // 39-41
168
  unsigned char NullByte;   // 42 0x00
169
  unsigned char Version;        // 43
170
  unsigned char EndByte;        // 0x7D
171
} VarioPacket_t;
172
 
173
typedef struct
174
{
175
  unsigned char StartByte;  //0         // 0x7C
176
  unsigned char Packet_ID;  //1         // 0x8A  - GPS ID 
177
  unsigned char WarnBeep;   //2         // Anzahl der Töne 0..36
178
  unsigned char SensorID;       // 4 0xA0
179
  unsigned char InverseStatus1; // 5  
180
  unsigned char InverseStatus2; // 6
181
  unsigned char Heading;        //7     // 1 = 2°
182
  unsigned int Speed;           //8+9   // in km/h
183
  unsigned char Lat_North;      //10    
184
  unsigned char Lat_G;      //11
185
  unsigned char Lat_M;      //12
186
  unsigned char Lat_Sek1;       //13    
187
  unsigned char Lat_Sek2;       //14    
188
  unsigned char Lon_East;       //15    
189
  unsigned char Lon_G;      //16
190
  unsigned char Lon_M;      //17
191
  unsigned char Lon_Sek1;       //18    
192
  unsigned char Lon_Sek2;       //19    
193
  unsigned int Distance;        //20+21    // 9000 = 0m
194
    signed int Altitude;        //22+23    // 500 = 0m
195
  unsigned int m_sec;           //24+25    // 3000 = 0
196
  unsigned char m_3sec;         //26 120 = 0
197
  unsigned char NumOfSats;      //27
198
  unsigned char SatFix;     //28
199
  unsigned char HomeDirection; // 29
200
  unsigned char AngleX;           // 30 
201
  unsigned char AngleY;       // 31
202
  unsigned char AngleZ;       // 32
203
    signed int GyroX;         //33+34
204
    signed int GyroY;         //35+36
205
    signed int GyroZ;         //37+38
206
  unsigned char Vibration;    // 39
207
  char              FreeCharacters[3]; // 40-42
208
  unsigned char Version;        // 43
209
  unsigned char EndByte;                // 0x7D
210
} GPSPacket_t;
211
 
212
typedef struct
213
{
214
  unsigned char StartByte;      // 0x7B
215
  unsigned char Packet_ID;      // 
216
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
217
  char Text[8*21];
218
  unsigned char EndByte;                // 0x7D
219
} ASCIIPacket_t;
220
 
221
 
222
 
223
extern GPSPacket_t GPSPacket;
224
extern VarioPacket_t VarioPacket;
225
extern ASCIIPacket_t ASCIIPacket;
226
extern ElectricAirPacket_t ElectricAirPacket;
227
extern HoTTGeneral_t HoTTGeneral;
228
 
229
#define HOTT_VARIO_PACKET_ID            0x89
230
#define HOTT_GPS_PACKET_ID                      0x8A
231
#define HOTT_ELECTRIC_AIR_PACKET_ID     0x8E
232
#define HOTT_GENERAL_PACKET_ID          0x8D
233
#define JETI_GPS_PACKET_ID1                     0x01
234
#define JETI_GPS_PACKET_ID2                     0x02
235
#define HOTT_WPL_NAME                           0x03
236
 
237
#endif 
238
#endif
239